__init__.py 1.0 KB

12345678910111213141516171819202122232425
  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. from ._base import Executor, Future
  7. from ._base import wait, as_completed
  8. from ._base import TimeoutError, CancelledError
  9. from ._base import ALL_COMPLETED, FIRST_COMPLETED, FIRST_EXCEPTION
  10. from .backend.context import cpu_count
  11. from .backend.reduction import set_loky_pickler
  12. from .reusable_executor import get_reusable_executor
  13. from .cloudpickle_wrapper import wrap_non_picklable_objects
  14. from .process_executor import BrokenProcessPool, ProcessPoolExecutor
  15. __all__ = ["get_reusable_executor", "cpu_count", "wait", "as_completed",
  16. "Future", "Executor", "ProcessPoolExecutor",
  17. "BrokenProcessPool", "CancelledError", "TimeoutError",
  18. "FIRST_COMPLETED", "FIRST_EXCEPTION", "ALL_COMPLETED",
  19. "wrap_non_picklable_objects", "set_loky_pickler"]
  20. __version__ = '2.8.0'