Module sync::mutexExperimental [-]  [+] [src]

A proper mutex implementation regardless of the "flavor of task" which is acquiring the lock.

Structs

Guard

An RAII implementation of a "scoped lock" of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.

Mutex

A mutual exclusion primitive useful for protecting shared data

StaticMutex

The static mutex type is provided to allow for static allocation of mutexes.

Constants

pub const GREEN_BLOCKED: uint = 1 << 1  
pub const LOCKED: uint = 1 << 0  
pub const MUTEX_INIT: StaticMutex = [definition]

Static initialization of a mutex. This constant can be used to initialize other mutex constants.

 
pub const NATIVE_BLOCKED: uint = 1 << 2