Struct tokio::sync::notify::NotifyWaitersList
source · struct NotifyWaitersList<'a> {
list: GuardedLinkedList<Waiter, <Waiter as Link>::Target>,
is_empty: bool,
notify: &'a Notify,
}
Expand description
List used in Notify::notify_waiters
. It wraps a guarded linked list
and gates the access to it on notify.waiters
mutex. It also empties
the list on drop.
Fields§
§list: GuardedLinkedList<Waiter, <Waiter as Link>::Target>
§is_empty: bool
§notify: &'a Notify
Implementations§
source§impl<'a> NotifyWaitersList<'a>
impl<'a> NotifyWaitersList<'a>
fn new( unguarded_list: LinkedList<Waiter, <Waiter as Link>::Target>, guard: Pin<&'a Waiter>, notify: &'a Notify, ) -> NotifyWaitersList<'a>
sourcefn pop_back_locked(
&mut self,
_waiters: &mut LinkedList<Waiter, <Waiter as Link>::Target>,
) -> Option<NonNull<Waiter>>
fn pop_back_locked( &mut self, _waiters: &mut LinkedList<Waiter, <Waiter as Link>::Target>, ) -> Option<NonNull<Waiter>>
Removes the last element from the guarded list. Modifying this list
requires an exclusive access to the main list in Notify
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for NotifyWaitersList<'a>
impl<'a> !RefUnwindSafe for NotifyWaitersList<'a>
impl<'a> !Send for NotifyWaitersList<'a>
impl<'a> !Sync for NotifyWaitersList<'a>
impl<'a> Unpin for NotifyWaitersList<'a>
impl<'a> !UnwindSafe for NotifyWaitersList<'a>
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