pub struct RwLock { /* private fields */ }Expand description
Read-write lock implementation
Implementations§
Source§impl RwLock
impl RwLock
Sourcepub fn try_read_lock(&self) -> bool
pub fn try_read_lock(&self) -> bool
Try to acquire read lock
Sourcepub fn read_unlock(&self)
pub fn read_unlock(&self)
Release read lock
Sourcepub fn write_lock(&self)
pub fn write_lock(&self)
Acquire write lock
Sourcepub fn try_write_lock(&self) -> bool
pub fn try_write_lock(&self) -> bool
Try to acquire write lock
Sourcepub fn write_unlock(&self)
pub fn write_unlock(&self)
Release write lock