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