Skip to content

Commit 18efce1

Browse files
committed
Merge branch 'stable-0.7'
2 parents 3aeb4f3 + 142bf49 commit 18efce1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adaptive/runner.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import functools
88
import inspect
99
import os
10+
import sys
1011
import time
1112
import traceback
1213
import warnings
@@ -241,7 +242,12 @@ def _remove_unfinished(self):
241242

242243
def _cleanup(self):
243244
if self.shutdown_executor:
244-
self.executor.shutdown(wait=False)
245+
# XXX: temporary set wait=True for Python 3.7
246+
# see https://github.com/python-adaptive/adaptive/issues/156
247+
# and https://github.com/python-adaptive/adaptive/pull/164
248+
self.executor.shutdown(
249+
wait=True if sys.version_info >= (3, 7) else False
250+
)
245251
self.end_time = time.time()
246252

247253
@property

0 commit comments

Comments
 (0)