Struct priomutex::Mutex [] [src]

pub struct Mutex<T> { /* fields omitted */ }

A mutex which allows waiting threads to specify a priority.

Methods

impl<T> Mutex<T>
[src]

[src]

Creates a new mutex in an unlocked state ready for use.

[src]

Takes the lock. If another thread is holding it, this function will block until the lock is released.

Waiting threads are woken up in order of priority. 0 is the highest priority, 1 is second-highest, etc.

[src]

Attempts to take the lock. Fails if another thread it already holding it, or is another thread is already waiting to take it.

Trait Implementations

impl<T: Debug> Debug for Mutex<T>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> Send for Mutex<T> where
    T: Send

impl<T> Sync for Mutex<T> where
    T: Send