pub unsafe trait RawRwLockUpgradeTimed: RawRwLockUpgrade + RawRwLockTimed {
    // Required methods
    fn try_lock_upgradable_for(&self, timeout: Self::Duration) -> bool;
    fn try_lock_upgradable_until(&self, timeout: Self::Instant) -> bool;
    unsafe fn try_upgrade_for(&self, timeout: Self::Duration) -> bool;
    unsafe fn try_upgrade_until(&self, timeout: Self::Instant) -> bool;
}
Expand description

Additional methods for RwLocks which support upgradable locks and locking with timeouts.

Required Methods§

fn try_lock_upgradable_for(&self, timeout: Self::Duration) -> bool

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

fn try_lock_upgradable_until(&self, timeout: Self::Instant) -> bool

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

unsafe fn try_upgrade_for(&self, timeout: Self::Duration) -> bool

Attempts to upgrade an upgradable lock to an exclusive lock until a timeout is reached.

Safety

This method may only be called if an upgradable lock is held in the current context.

unsafe fn try_upgrade_until(&self, timeout: Self::Instant) -> bool

Attempts to upgrade an upgradable lock to an exclusive lock until a timeout is reached.

Safety

This method may only be called if an upgradable lock is held in the current context.

Implementations on Foreign Types§

source§

impl RawRwLockUpgradeTimed for RawRwLock

source§

fn try_lock_upgradable_until(&self, timeout: Instant) -> bool

source§

fn try_lock_upgradable_for(&self, timeout: Duration) -> bool

source§

unsafe fn try_upgrade_until(&self, timeout: Instant) -> bool

source§

unsafe fn try_upgrade_for(&self, timeout: Duration) -> bool

Implementors§

source§

impl RawRwLockUpgradeTimed for holochain::prelude::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::dependencies::parking_lot::RawRwLock