Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 7e67afa

Browse files
Do not call shutdown() in run_parallel() when jobs=1 (#13)
1 parent 0feee35 commit 7e67afa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
Version 0.2.4
5+
-------------
6+
7+
Bug fixes
8+
~~~~~~~~~
9+
10+
- Do not call ``get_reusable_executor().shutdown()`` when tasks are run serially in ``run_parallel()``.
11+
412
Version 0.2.3
513
-------------
614

src/blueetl_core/parallel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def run_parallel(
117117
for i, task in enumerate(tasks)
118118
)
119119
finally:
120-
if shutdown_executor and (not backend or backend == "loky"):
120+
if shutdown_executor and (not backend or backend == "loky") and jobs != 1:
121121
# shutdown the pool of processes used by loky
122122
get_reusable_executor().shutdown(wait=True)
123123

0 commit comments

Comments
 (0)