pub type ReentrantMutex<T> = ReentrantMutex<RawMutex, RawThreadId, T>;Expand description
A mutex which can be recursively locked by a single thread.
This type is identical to Mutex except for the following points:
- Locking multiple times from the same thread will work correctly instead of deadlocking.
ReentrantMutexGuarddoes not give mutable references to the locked data. Use aRefCellif you need this.
See Mutex for more details about the underlying mutex
primitive.
Aliased Typeยง
struct ReentrantMutex<T> { /* private fields */ }