Reader-writer lock
This is a standard pthread rwlock.
Fields
-
inner: pthread_rwlock_t
Methods
impl RwLock { ... }
-
fn new() -> RwLock
Creates a new reader-writer lock.
-
fn read_lock(self: &mut RwLock)
Acquires a reader-writer lock for reading.
-
Attempts to acquire a reader-writer lock for reading.
Returns
true
if the lock was successfully acquired,false
otherwise. -
fn write_lock(self: &mut RwLock)
Acquires a reader-writer lock for writing.
-
Attempts to acquire a reader-writer lock for writing.
Returns
true
if the lock was successfully acquired,false
otherwise. -
fn unlock(self: &mut RwLock)
Releases a reader-writer lock.