Skip to content

do not force shutdown the executor in the cleanup #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion adaptive/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import functools
import inspect
import os
import sys
import time
import traceback
import warnings
Expand Down Expand Up @@ -241,7 +242,12 @@ def _remove_unfinished(self):

def _cleanup(self):
if self.shutdown_executor:
self.executor.shutdown(wait=False)
# XXX: temporary set wait=True for Python 3.7
# see https://github.com/python-adaptive/adaptive/issues/156
# and https://github.com/python-adaptive/adaptive/pull/164
self.executor.shutdown(
wait=True if sys.version_info >= (3, 7) else False
)
self.end_time = time.time()

@property
Expand Down