Module cancellable_pool

Source
Expand description

Provides an async blocking pool whose tasks can be cancelled.

Structs§

CancellableBlockingPool
A thread pool for running work that may block.
Inner 🔒
State 🔒

Enums§

Error
TimeoutAction
WindDownStates 🔒

Constants§

DEFAULT_SHUTDOWN_TIMEOUT 🔒

Statics§

EXECUTOR 🔒
Global executor.

Functions§

unblock
Spawn a task to run in the CancellableBlockingPool static executor.
unblock_disarm
Marks all the queued and in-flight tasks as cancelled. Any tasks queued after disarming will be cancelled. Doesn’t not wait for all the tasks to get cancelled.