Module tokio::util::idle_notified_set
source Β· Expand description
This module defines an IdleNotifiedSet
, which is a collection of elements.
Each element is intended to correspond to a task, and the collection will
keep track of which tasks have had their waker notified, and which have not.
Each entry in the set holds some user-specified value. The valueβs type is
specified using the T
parameter. It will usually be a JoinHandle
or
similar.
Structs§
- Entry
InOne πOfThe Lists A handle to an entry that is guaranteed to be stored in the idle or notified list of itsIdleNotifiedSet
. This value borrows theIdleNotifiedSet
mutably to prevent the entry from being moved to theNeither
list, which only theIdleNotifiedSet
may do. - Idle
Notified πSet This is the main handle to the collection. - List
Entry πAn entry in the list. - Lists
Inner πThe linked lists hold strong references to theListEntry
items, and theListEntry
items also hold a strong reference back to the Lists object, but the destructor of theIdleNotifiedSet
will clear the two lists, so once that object is destroyed, no ref-cycles will remain.
Enums§
- List πWhich of the two lists in the shared Lists object is this entry stored in?
Functions§
- move_
to_ π βnew_ list Safety
Type Aliases§
- Linked
List π - Lists π