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 its
IdleNotifiedSet
. 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 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Β§
- Linked
List π - Lists π