diff --git a/CHANGELOG.rst b/CHANGELOG.rst index eee3150..71f4c9b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,14 @@ Changelog ========= +Version 0.2.4 +------------- + +Bug fixes +~~~~~~~~~ + +- Do not call ``get_reusable_executor().shutdown()`` when tasks are run serially in ``run_parallel()``. + Version 0.2.3 ------------- diff --git a/src/blueetl_core/parallel.py b/src/blueetl_core/parallel.py index 0d974d0..9232bef 100644 --- a/src/blueetl_core/parallel.py +++ b/src/blueetl_core/parallel.py @@ -117,7 +117,7 @@ def run_parallel( for i, task in enumerate(tasks) ) finally: - if shutdown_executor and (not backend or backend == "loky"): + if shutdown_executor and (not backend or backend == "loky") and jobs != 1: # shutdown the pool of processes used by loky get_reusable_executor().shutdown(wait=True)