Struct sync::raw::RWLockWriteGuard[src]

pub struct RWLockWriteGuard<'a> {
    pub cond: Condvar<'a>,
    // some fields omitted
}

An RAII helper which is created by acquiring a write lock on an RWLock. When dropped, this will unlock the RWLock.

A value of this type can also be consumed to downgrade to a read-only lock.

Fields

cond

Inner condition variable that is connected to the write-mode of the outer rwlock.

Methods

impl<'a> RWLockWriteGuard<'a>

fn downgrade(self) -> RWLockReadGuard<'a>

Consumes this write lock and converts it into a read lock.

Trait Implementations

impl<'a> Drop for RWLockWriteGuard<'a>

fn drop(&mut self)