diff --git a/adaptive/runner.py b/adaptive/runner.py index c5543ac7c..ff3a137c3 100644 --- a/adaptive/runner.py +++ b/adaptive/runner.py @@ -182,7 +182,7 @@ def __init__( npoints_goal: int | None = None, end_time_goal: datetime | None = None, duration_goal: timedelta | int | float | None = None, - executor: (ExecutorTypes | None) = None, + executor: ExecutorTypes | None = None, ntasks: int = None, log: bool = False, shutdown_executor: bool = False, @@ -934,11 +934,9 @@ def replay_log( # -- Internal executor-related, things -def _ensure_executor( - executor: ExecutorTypes | None, -) -> concurrent.Executor: +def _ensure_executor(executor: ExecutorTypes | None) -> concurrent.Executor: if executor is None: - executor = concurrent.ProcessPoolExecutor() + executor = _default_executor() if isinstance(executor, concurrent.Executor): return executor