| 1 |
r"""The :mod:`loky` module manages a pool of worker that can be re-used across time. |
| 2 |
It provides a robust and dynamic implementation os the |
| 3 |
:class:`ProcessPoolExecutor` and a function :func:`get_reusable_executor` which |
| 4 |
hide the pool management under the hood. |
| 5 |
""" |
| 6 |
|
| 7 |
from concurrent.futures import ( |
| 8 |
ALL_COMPLETED, |
| 9 |
FIRST_COMPLETED, |
| 10 |
FIRST_EXCEPTION, |
| 11 |
CancelledError, |
| 12 |
Executor, |
| 13 |
TimeoutError, |
| 14 |
as_completed, |
| 15 |
wait, |
| 16 |
) |
| 17 |
|
| 18 |
from ._base import Future |
| 19 |
from .backend.context import cpu_count |
| 20 |
from .backend.reduction import set_loky_pickler |
| 21 |
from .reusable_executor import get_reusable_executor |
| 22 |
from .cloudpickle_wrapper import wrap_non_picklable_objects |
| 23 |
from .process_executor import BrokenProcessPool, ProcessPoolExecutor |
| 24 |
|
| 25 |
|
| 26 |
__all__ = [ |
| 27 |
"get_reusable_executor", |
| 28 |
"cpu_count", |
| 29 |
"wait", |
| 30 |
"as_completed", |
| 31 |
"Future", |
| 32 |
"Executor", |
| 33 |
"ProcessPoolExecutor", |
| 34 |
"BrokenProcessPool", |
| 35 |
"CancelledError", |
| 36 |
"TimeoutError", |
| 37 |
"FIRST_COMPLETED", |
| 38 |
"FIRST_EXCEPTION", |
| 39 |
"ALL_COMPLETED", |
| 40 |
"wrap_non_picklable_objects", |
| 41 |
"set_loky_pickler", |
| 42 |
] |
| 43 |
|
| 44 |
|
| 45 |
__version__ = "3.5.6" |