Type Alias parking_lot::ReentrantMutex

source ·
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.
  • ReentrantMutexGuard does not give mutable references to the locked data. Use a RefCell if you need this.

See Mutex for more details about the underlying mutex primitive.

Aliased Type§

struct ReentrantMutex<T> { /* private fields */ }