pub struct Condvar { /* private fields */ }
Expand description
An SGX-based condition variable.
Implementations
sourceimpl Condvar
impl Condvar
sourcepub fn notify_one(&self)
pub fn notify_one(&self)
Signals one waiter on this condition variable to wake up.
sourcepub fn notify_all(&self)
pub fn notify_all(&self)
Awakens all current waiters on this condition variable.
sourcepub unsafe fn wait(&self, mutex: &MovableMutex)
pub unsafe fn wait(&self, mutex: &MovableMutex)
Waits for a signal on the specified mutex.
Behavior is undefined if the mutex is not locked by the current thread.
May panic if used with more than one mutex.
sourcepub unsafe fn wait_timeout(&self, mutex: &MovableMutex, dur: Duration) -> bool
pub unsafe fn wait_timeout(&self, mutex: &MovableMutex, dur: Duration) -> bool
Waits for a signal on the specified mutex with a timeout duration
specified by dur
(a relative time into the future).
Behavior is undefined if the mutex is not locked by the current thread.
May panic if used with more than one mutex.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Condvar
impl Send for Condvar
impl Sync for Condvar
impl Unpin for Condvar
impl UnwindSafe for Condvar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more