Available on crate feature
mutex only.Expand description
A mutual exclusion primitive useful for protecting shared data.
Structs§
- NSTD
Mutex - A mutual exclusion primitive useful for protecting shared data.
- NSTD
Mutex Guard - A guard providing access to a mutex’s protected data.
Functions§
- nstd_
mutex_ ⚠drop - Frees an instance of
NSTDMutexafter invokingcallbackwith the mutex’s data. - nstd_
mutex_ free - Frees an instance of
NSTDMutex. - nstd_
mutex_ get - Returns a pointer to a mutex’s raw data.
- nstd_
mutex_ get_ mut - Returns a mutable pointer to a mutex’s raw data.
- nstd_
mutex_ into_ inner - Consumes a mutex and returns the data it was protecting.
- nstd_
mutex_ is_ poisoned - Determines whether or not a mutex’s data is poisoned.
- nstd_
mutex_ lock - Waits for a mutex lock to become acquired, returning a guard wrapping the protected data.
- nstd_
mutex_ new - Creates a new mutual exclusion primitive.
- nstd_
mutex_ try_ lock - The non-blocking variant of
nstd_mutex_lockreturning an uninitialized “none” result if the mutex is locked by another thread. - nstd_
mutex_ unlock - Unlocks a mutex by consuming a mutex guard.
Type Aliases§
- NSTD
Mutex Lock Result - A lock result returned from
nstd_mutex_lockcontaining the mutex guard whether or not the data is poisoned. - NSTD
Optional Mutex - Represents an optional value of type
NSTDMutex. - NSTD
Optional Mutex Lock Result - An optional value of type
NSTDMutexLockResult.