Trait concurrency_traits::mutex::RawAsyncMutex[][src]

pub unsafe trait RawAsyncMutex: RawTryMutex {
    #[must_use]
    fn lock_async<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

A raw async mutex that hold no data but the lock itself.

Required methods

#[must_use]
fn lock_async<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Locks the mutex asynchronously

Implementors

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

fn lock_async<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

impl<Q> RawAsyncMutex for RawFullAsyncMutex<Q> where
    Q: TryQueue<Item = CompleteFutureHandle> + Sync
[src]

fn lock_async<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]