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§

  • A handle to an entry that is guaranteed to be stored in the idle or notified list of its IdleNotifiedSet. This value borrows the IdleNotifiedSet mutably to prevent the entry from being moved to the Neither list, which only the IdleNotifiedSet 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 the ListEntry items also hold a strong reference back to the Lists object, but the destructor of the IdleNotifiedSet 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§

Type Aliases§