Expand description
Rayon global thread-pool initialization utilities for process-wide concurrency caps.
Structs§
- Concurrency
Caps - Snapshot of active concurrency cap values.
Constants§
- DEFAULT_
RAYON_ NUM_ THREADS - Default thread count used for Rayon when
RAYON_NUM_THREADSis unset/invalid. - DEFAULT_
TOKIO_ WORKER_ THREADS - Default worker count used for Tokio when
TOKIO_WORKER_THREADSis 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.