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§
- EntryInOneOfTheLists πA handle to an entry that is guaranteed to be stored in the idle or notified list of its
IdleNotifiedSet
. This value borrows theIdleNotifiedSet
mutably to prevent the entry from being moved to theNeither
list, which only theIdleNotifiedSet
may do. - IdleNotifiedSet πThis is the main handle to the collection.
- ListEntry πAn entry in the list.
- ListsInner πThe linked lists hold strong references to the
ListEntry
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§
- LinkedList π
- Lists π