|
rstd 0.1.0
|
A mutual exclusion primitive useful for protecting shared data. More...
Public Member Functions | |
| Mutex (T initial_data) | |
| Creates a new mutex wrapping the given data. | |
| auto | lock_mut () const -> Result< MutexGuard< T >, empty > |
| Acquires the mutex, blocking the current thread until it is able to do so. | |
| auto | lock () const -> Result< MutexGuard< T >, empty > |
| Acquires the mutex (alias for lock_mut; no poisoning support yet). | |
A mutual exclusion primitive useful for protecting shared data.
| T | The type of the data protected by this mutex. |
|
inline |
Creates a new mutex wrapping the given data.
| initial_data | The initial value to protect. |
|
inline |
Acquires the mutex, blocking the current thread until it is able to do so.