SingleThreadedRwLock
Single-threaded applications use this for deadlock checks in debug mode, and no-ops in release modes.
Fields of this type
Fields
- state:enum { unlocked, locked_exclusive, locked_shared }
- = .unlocked
- shared_count:usize
- = 0
Attempts to obtain exclusive lock ownership.
Functions
- tryLock
- Attempts to obtain exclusive lock ownership.
- lock
- Blocks until exclusive lock ownership is acquired.
- unlock
- Releases a held exclusive lock.
- tryLockShared
- Attempts to obtain shared lock ownership.
- lockShared
- Blocks until shared lock ownership is acquired.
- unlockShared
- Releases a held shared lock.