Trait concurrency_traits::mutex::RawTryMutex[][src]

pub unsafe trait RawTryMutex {
    fn try_lock(&self) -> bool;
unsafe fn unlock(&self); }
Expand description

A raw mutex that can be tried and holds no data.

Required methods

fn try_lock(&self) -> bool[src]

Locks the mutex, non-blocking. Returns true if locked.

unsafe fn unlock(&self)[src]

Safety

Must only be called when sure that no references exist to contained data.

Implementors

impl RawTryMutex for RawAtomicMutex[src]

fn try_lock(&self) -> bool[src]

unsafe fn unlock(&self)[src]

impl<CS> RawTryMutex for RawParkMutex<CS> where
    CS: ThreadParker + ThreadFunctions,
    CS::ThreadId: Clone
[src]

fn try_lock(&self) -> bool[src]

unsafe fn unlock(&self)[src]

impl<CS> RawTryMutex for RawSpinLock<CS>[src]

fn try_lock(&self) -> bool[src]

unsafe fn unlock(&self)[src]

impl<M, Q> RawTryMutex for RawCustomAsyncMutex<M, Q> where
    M: 'static + RawMutex + Send + Sync,
    Q: 'static + Queue<Item = RawCustomAsyncMutexMessage> + Send + Sync
[src]

fn try_lock(&self) -> bool[src]

unsafe fn unlock(&self)[src]

impl<Q> RawTryMutex for RawFullAsyncMutex<Q> where
    Q: TryQueue<Item = CompleteFutureHandle>, 
[src]

fn try_lock(&self) -> bool[src]

unsafe fn unlock(&self)[src]