Trait lock_api::RawRwLockTimed[][src]

pub unsafe trait RawRwLockTimed: RawRwLock {
    type Duration;
    type Instant;
    fn try_lock_shared_for(&self, timeout: Self::Duration) -> bool;
fn try_lock_shared_until(&self, timeout: Self::Instant) -> bool;
fn try_lock_exclusive_for(&self, timeout: Self::Duration) -> bool;
fn try_lock_exclusive_until(&self, timeout: Self::Instant) -> bool; }

Additional methods for RwLocks which support locking with timeouts.

The Duration and Instant types are specified as associated types so that this trait is usable even in no_std environments.

Associated Types

type Duration[src]

Duration type used for try_lock_for.

type Instant[src]

Instant type used for try_lock_until.

Loading content...

Required methods

fn try_lock_shared_for(&self, timeout: Self::Duration) -> bool[src]

Attempts to acquire a shared lock until a timeout is reached.

fn try_lock_shared_until(&self, timeout: Self::Instant) -> bool[src]

Attempts to acquire a shared lock until a timeout is reached.

fn try_lock_exclusive_for(&self, timeout: Self::Duration) -> bool[src]

Attempts to acquire an exclusive lock until a timeout is reached.

fn try_lock_exclusive_until(&self, timeout: Self::Instant) -> bool[src]

Attempts to acquire an exclusive lock until a timeout is reached.

Loading content...

Implementors

Loading content...