pub struct WaitCondition { /* private fields */ }Expand description
Shared host wait condition. Hosts may provide their own atomic storage and call
notify after changing it. No predicate callback runs inside a loop turn.
Implementations§
Source§impl WaitCondition
impl WaitCondition
Sourcepub fn new(value: u64) -> Result<Self>
pub fn new(value: u64) -> Result<Self>
Create shared storage and initialize the platform wait service if needed.
Sourcepub fn from_atomic(value: Arc<AtomicU64>) -> Result<Self>
pub fn from_atomic(value: Arc<AtomicU64>) -> Result<Self>
Register host-owned atomic storage. Call notify after external mutations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WaitCondition
impl RefUnwindSafe for WaitCondition
impl Send for WaitCondition
impl Sync for WaitCondition
impl Unpin for WaitCondition
impl UnsafeUnpin for WaitCondition
impl UnwindSafe for WaitCondition
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