pub struct Waitable(pub(crate) Arc<(Condvar, Mutex<bool>)>);
Expand description
Waitable allows one thread to wait on a signal from another thread.
A Waitable is usually created with a Promise using
create_promise_and_waitable
, and the Promise is used by one thread and the
Waitable can be used by another thread. Promise and Waitable do not use any
OS-level synchronization primitives.
Tuple Fields§
§0: Arc<(Condvar, Mutex<bool>)>
Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Waitable
impl Send for Waitable
impl Sync for Waitable
impl Unpin for Waitable
impl UnwindSafe for Waitable
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more