Skip to main content

Crate adze_concurrency_init_core

Crate adze_concurrency_init_core 

Source
Expand description

Rayon global thread-pool initialization utilities for process-wide concurrency caps.

Structs§

ConcurrencyCaps
Snapshot of active concurrency cap values.

Constants§

DEFAULT_RAYON_NUM_THREADS
Default thread count used for Rayon when RAYON_NUM_THREADS is unset/invalid.
DEFAULT_TOKIO_WORKER_THREADS
Default worker count used for Tokio when TOKIO_WORKER_THREADS is unset/invalid.
RAYON_NUM_THREADS_ENV
Environment variable used for Rayon global thread-pool caps.
TOKIO_WORKER_THREADS_ENV
Environment variable used for Tokio worker-thread caps.

Functions§

current_caps
Return the current caps resolved from environment values.
init_concurrency_caps
Initialize concurrency caps by reading the current process environment.
init_rayon_global_once
Initialize Rayon global thread-pool once for the current process.
is_already_initialized_error
Return whether the provided message represents a Rayon global-pool already-initialized error.
parse_positive_usize_or_default
Parse an optional positive integer value, falling back to default.