Crate wakerpool

source ·
Expand description

Shared Future implementations, like channels, often store lists of core::task::Waker. This crate provides an efficient WakerList that avoids memory allocation under conditions where wakers are frequently stored and woken.

Nodes are stored in a thread-local object pool and backed by a global, lock-free pool.

NOTE: For efficiency and simplicity, this crate never deallocates nodes. If you expect to potentially store unbounded sets of Wakers, use a std::vec::Vec.

Structs§