Skip to main content

Module pool

Module pool 

Source
Expand description

Thread pool for blocking operations

Structsยง

BlockingPool ๐Ÿ”’
Inner ๐Ÿ”’
LockedImpl ๐Ÿ”’
Single-mutex + condvar implementation.
LockedInner ๐Ÿ”’
Spawner ๐Ÿ”’
SpawnerMetrics ๐Ÿ”’
Task ๐Ÿ”’
ThreadManagementState ๐Ÿ”’
Thread-management state used by every InnerImpl variant.

Enumsยง

InnerImpl ๐Ÿ”’
Per-variant queue + notification + lock topology.
Mandatory ๐Ÿ”’
SpawnError ๐Ÿ”’

Constantsยง

KEEP_ALIVE ๐Ÿ”’

Functionsยง

is_temporary_os_thread_error ๐Ÿ”’
spawn_blocking ๐Ÿ”’
Runs the provided function on an executor dedicated to blocking operations. Tasks will be scheduled as non-mandatory, meaning they may not get executed in case of runtime shutdown.
spawn_mandatory_blocking ๐Ÿ”’
Runs the provided function on an executor dedicated to blocking operations. Tasks will be scheduled as mandatory, meaning they are guaranteed to run unless a shutdown is already taking place. In case a shutdown is already taking place, None will be returned.

Type Aliasesยง

ShutdownHandles ๐Ÿ”’
State handed back from InnerImpl::begin_shutdown to the caller so it can join the worker threads after the wait completes: an optional previously-timed-out worker, plus the map of currently-running workers.