struct Waiter {
pointers: Pointers<Waiter>,
waker: UnsafeCell<Option<Waker>>,
notification: AtomicNotification,
_p: PhantomPinned,
}Fields§
§pointers: Pointers<Waiter>Intrusive linked-list pointers.
waker: UnsafeCell<Option<Waker>>Waiting task’s waker. Depending on the value of notification,
this field is either protected by the waiters lock in
Notify, or it is exclusively owned by the enclosing Waiter.
notification: AtomicNotificationNotification for this waiter. Uses 2 bits to store if and how was notified, 1 bit for storing if it was woken up using FIFO or LIFO, and the rest of it is unused.
- if it’s
None, thenwakeris protected by thewaiterslock. - if it’s
Some, thenwakeris exclusively owned by the enclosingWaiterand can be accessed without locking.
_p: PhantomPinnedShould not be Unpin.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Waiter
impl !RefUnwindSafe for Waiter
impl Send for Waiter
impl !Sync for Waiter
impl !Unpin for Waiter
impl !UnwindSafe for Waiter
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