Struct loom::future::AtomicWaker
source · pub struct AtomicWaker { /* private fields */ }
Available on crate feature
futures
only.Expand description
Mock implementation of tokio::sync::AtomicWaker
.
Implementations§
source§impl AtomicWaker
impl AtomicWaker
sourcepub fn new() -> AtomicWaker
pub fn new() -> AtomicWaker
Create a new instance of AtomicWaker
.
sourcepub fn register(&self, waker: Waker)
pub fn register(&self, waker: Waker)
Registers the current task to be notified on calls to wake
.
sourcepub fn register_by_ref(&self, waker: &Waker)
pub fn register_by_ref(&self, waker: &Waker)
Registers the current task to be woken without consuming the value.
sourcepub fn take_waker(&self) -> Option<Waker>
pub fn take_waker(&self) -> Option<Waker>
Attempts to take the Waker
value out of the AtomicWaker
with the
intention that the caller will wake the task later.
Trait Implementations§
source§impl Debug for AtomicWaker
impl Debug for AtomicWaker
Auto Trait Implementations§
impl !Freeze for AtomicWaker
impl RefUnwindSafe for AtomicWaker
impl Send for AtomicWaker
impl Sync for AtomicWaker
impl Unpin for AtomicWaker
impl UnwindSafe for AtomicWaker
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