Struct condition_variable::ConditionVariable
[−]
[src]
pub struct ConditionVariable<T> { /* fields omitted */ }
Methods
impl<T: PartialEq + Clone> ConditionVariable<T>
[src]
fn new(value: T) -> ConditionVariable<T>
fn set(&self, value: T, notify: Notify)
fn touch(&self, notify: Notify)
fn get(&self) -> Result<T, PoisonError<MutexGuard<T>>>
fn wait_for(&self, expected: T) -> Result<(), PoisonError<MutexGuard<T>>>
fn wait_for_in(&self, expected: &[T]) -> Result<(), PoisonError<MutexGuard<T>>>
fn wait_for_update(&self) -> Result<(), PoisonError<MutexGuard<T>>>
fn wait_for_condition<F: FnMut(&T) -> bool>(
&self,
cond_func: F
) -> Result<(), PoisonError<MutexGuard<T>>>
&self,
cond_func: F
) -> Result<(), PoisonError<MutexGuard<T>>>
fn wait_for_ms(
&self,
expected: T,
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
&self,
expected: T,
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
fn wait_for_in_ms(
&self,
expected: &[T],
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
&self,
expected: &[T],
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
fn wait_for_update_ms(
&self,
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
&self,
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
fn wait_for_condition_ms<F: FnMut(&T) -> bool>(
&self,
cond_func: F,
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
&self,
cond_func: F,
timeout_ms: i64
) -> Result<bool, PoisonError<(MutexGuard<T>, bool)>>
impl<T: PartialEq + Clone + Send> ConditionVariable<T>
[src]
fn as_channel_once(&self) -> Receiver<T>
Sends out a value over the channel as soon as the ConditionVariable changes its value
impl ConditionVariable<()>
[src]
fn wait_ms(&self, timeout_ms: u32) -> LockResult<(MutexGuard<()>, bool)>
waits for a notify (useful if T==())