A lock that supports one writer or many readers. This API is for kernel threads, not evented I/O. This API requires being initialized at runtime, and initialization can fail. Once initialized, the core operations cannot fail.
Functions
fn tryLock(rwl: *RwLock) bool
Attempts to obtain exclusive lock ownership. Returns
true
if the lock is obta…Attempts to obtain exclusive lock ownership. Returns
true
if the lock is obtained,false
otherwise.fn tryLockShared(rwl: *RwLock) bool
Attempts to obtain shared lock ownership. Returns
true
if the lock is obtaine…Attempts to obtain shared lock ownership. Returns
true
if the lock is obtained,false
otherwise.