Resolves the number of worker threads to use.
If a configured value is provided, it is returned. Otherwise, it defaults to os.cpu_count(), with a floor of 1 if os.cpu_count() is None.
Returns:
The resolved number of worker threads (>= 1).
Methods
resolve_worker_count
resolve_worker_count(configured: Optional) -> int
Resolves the number of worker threads to use.
If a configured value is provided, it is returned. Otherwise, it defaults to os.cpu_count(), with a floor of 1 if os.cpu_count() is None.
Returns:
The resolved number of worker threads (>= 1).
| Parameter | Type | Description |
|---|---|---|
| configured | Optional | The configured max_workers value, or None to use default. |
Generated with Flude
Copyright © 2026