Skip to main content

CondvarExt

Trait CondvarExt 

Source
pub trait CondvarExt {
    // Required methods
    fn wait_unpoisoned<'a, T>(
        &self,
        guard: MutexGuard<'a, T>,
    ) -> MutexGuard<'a, T>;
    fn wait_timeout_unpoisoned<'a, T>(
        &self,
        guard: MutexGuard<'a, T>,
        timeout: Duration,
    ) -> (MutexGuard<'a, T>, WaitTimeoutResult);
}
Expand description

Waits on a Condvar and continues when the mutex was poisoned meanwhile.

Required Methods§

Source

fn wait_unpoisoned<'a, T>(&self, guard: MutexGuard<'a, T>) -> MutexGuard<'a, T>

Blocks until notified, recovering the guard from a poisoned mutex.

Source

fn wait_timeout_unpoisoned<'a, T>( &self, guard: MutexGuard<'a, T>, timeout: Duration, ) -> (MutexGuard<'a, T>, WaitTimeoutResult)

Blocks until notified or timeout elapses, recovering from a poisoned mutex.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CondvarExt for Condvar

Source§

fn wait_unpoisoned<'a, T>(&self, guard: MutexGuard<'a, T>) -> MutexGuard<'a, T>

Source§

fn wait_timeout_unpoisoned<'a, T>( &self, guard: MutexGuard<'a, T>, timeout: Duration, ) -> (MutexGuard<'a, T>, WaitTimeoutResult)

Implementors§