Module kernel::sync::mutex

source ·
Expand description

The mutex module provides a mutual exclusion primitive useful for protecting shared data.

Structs

  • The Mutex struct is a mutual exclusion primitive useful for protecting shared data, which implements the Send and Sync traits.
  • The MutexGuard struct is an RAII guard to allow scoped unlock of the lock. When the guard goes out of scope, the Mutex it guards will be unlocked.