Trait lock_api::RawRwLockUpgrade[][src]

pub unsafe trait RawRwLockUpgrade: RawRwLock {
    fn lock_upgradable(&self);
fn try_lock_upgradable(&self) -> bool;
fn unlock_upgradable(&self);
fn upgrade(&self);
fn try_upgrade(&self) -> bool; }

Additional methods for RwLocks which support atomically upgrading a shared lock to an exclusive lock.

This requires acquiring a special "upgradable read lock" instead of a normal shared lock. There may only be one upgradable lock at any time, otherwise deadlocks could occur when upgrading.

Required Methods

Acquires an upgradable lock, blocking the current thread until it is able to do so.

Attempts to acquire an upgradable lock without blocking.

Releases an upgradable lock.

Upgrades an upgradable lock to an exclusive lock.

Attempts to upgrade an upgradable lock to an exclusive lock without blocking.

Implementors