Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eefa862

Browse filesBrowse files
authored
Use default executor when Runner(..., executor=None) (#389)
1 parent ad6e3fb commit eefa862
Copy full SHA for eefa862

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed

‎adaptive/runner.py

Copy file name to clipboardExpand all lines: adaptive/runner.py
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def __init__(
182182
npoints_goal: int | None = None,
183183
end_time_goal: datetime | None = None,
184184
duration_goal: timedelta | int | float | None = None,
185-
executor: (ExecutorTypes | None) = None,
185+
executor: ExecutorTypes | None = None,
186186
ntasks: int = None,
187187
log: bool = False,
188188
shutdown_executor: bool = False,
@@ -934,11 +934,9 @@ def replay_log(
934934
# -- Internal executor-related, things
935935

936936

937-
def _ensure_executor(
938-
executor: ExecutorTypes | None,
939-
) -> concurrent.Executor:
937+
def _ensure_executor(executor: ExecutorTypes | None) -> concurrent.Executor:
940938
if executor is None:
941-
executor = concurrent.ProcessPoolExecutor()
939+
executor = _default_executor()
942940

943941
if isinstance(executor, concurrent.Executor):
944942
return executor

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.