Classes
WorkerMode
0
▼
Worker spawning strategy.
WorkerMode
0
▼
Worker spawning strategy.
WorkerExecutionMode
0
▼
Worker execution model.
WorkerExecutionMode
0
▼
Worker execution model.
Functions
is_gil_enabled
0
bool
▼
Check whether the GIL is active in the current interpreter.
Returns ``False`` …
is_gil_enabled
0
bool
▼
def is_gil_enabled() -> bool
Check whether the GIL is active in the current interpreter.
ReturnsFalse on Python 3.14t (free-threading) and Trueon
standard GIL-enabled builds. Falls back toTrueon Python < 3.13
wheresys._is_gil_enableddoes not exist.
Returns
bool
detect_worker_mode
0
WorkerMode
▼
Choose the worker spawning strategy based on GIL state.
detect_worker_mode
0
WorkerMode
▼
def detect_worker_mode() -> WorkerMode
Returns
WorkerMode
default_worker_count
0
int
▼
Return a sensible default worker count based on available CPUs.
Returns ``os.c…
default_worker_count
0
int
▼
def default_worker_count() -> int
Return a sensible default worker count based on available CPUs.
Returnsos.cpu_count() or 1when the CPU count cannot be
determined.
Returns
int
resolve_worker_execution_mode
1
WorkerExecutionMode
▼
Resolve the effective worker execution mode.
resolve_worker_execution_mode
1
WorkerExecutionMode
▼
def resolve_worker_execution_mode(worker_mode: str) -> WorkerExecutionMode
Parameters
| Name | Type | Description |
|---|---|---|
worker_mode |
str |
Config value ("auto", "sync", "async"). |
Returns
WorkerExecutionMode