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. If another thread is holding it, this function returns None.

Trait Implementations

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

impl<T> Clone for Mutex<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more