ContextExecutor
Base classes¶
| Name | Children | Inherits |
|---|---|---|
ThreadPoolExecutorconcurrent.futures.thread |
|
⋔ Inheritance diagram¶
graph TD
3834026703["threadgroup.ContextExecutor"]
965796427["thread.ThreadPoolExecutor"]
407344789["_base.Executor"]
2751680898["builtins.object"]
965796427 --> 3834026703
407344789 --> 965796427
2751680898 --> 407344789
🛈 DocStrings¶
Bases: ThreadPoolExecutor
Thread pool executor that preserves context variables across threads.
This executor captures the current context variables when created and initializes each worker thread with this context.
Source code in src/anyenv/calling/threadgroup.py
__init__
¶
Initialize with the current context variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_workers
|
int | None
|
Maximum number of worker threads to use |
None
|