Available on crate feature
nstd_mutex only.Expand description
A mutual exclusion primitive useful for protecting shared data.
Functions
- Frees an instance of
NSTDMutexafter invokingcallbackwith the mutex’s data. - Frees an instance of
NSTDMutex. - Returns a pointer to a mutex’s raw data.
- Returns a mutable pointer to a mutex’s raw data.
- Consumes a mutex and returns the data it was protecting.
- Determines whether or not a mutex’s data is poisoned.
- Waits for a mutex lock to become acquired, returning a guard wrapping the protected data.
- Creates a new mutual exclusion primitive.
- The non-blocking variant of
nstd_mutex_lockreturning an uninitialized “none” result if the mutex is locked by another thread. - Unlocks a mutex by consuming a mutex guard.
Type Definitions
- A mutual exclusion primitive useful for protecting shared data.
- A guard providing access to a mutex’s protected data.
- A lock result returned from
nstd_mutex_lockcontaining the mutex guard whether or not the data is poisoned. - An optional value of type
NSTDMutexLockResult.