Expand description
Keep track of how many futures of a certain kind are running (in an AtomicUsize)
Structs§
- Counted
Fut - An AtomicUsize is incremented when building this future, and decremented again when the future completes.
- Counted
Guard
Statics§
- PENDING_
HANDLES - Global counter for spawn_counted and spawn_counted_w_handle
Functions§
- spawn_
blocking_ counted_ w_ handle - Spawn blocking
futas a CountedFut (increments/decrements an AtomicUsize) on the given tokio::runtime::Handle. - spawn_
counted - Spawn
futas a CountedFut (increments/decrements an AtomicUsize) - spawn_
counted_ w_ handle - Spawn
futas a CountedFut (increments/decrements an AtomicUsize) on the given tokio::runtime::Handle. - wait_
for_ all_ pending_ handles - Waits for PENDING_HANDLES to reach zero. All counted futures must be [Tripwire]-aware, and the tripwire must’ve been tripped, otherwise this is just going to sleep for 600 seconds.