4949 # On Windows and MacOS functions, the __main__ module must be
5050 # importable by worker subprocesses. This means that
5151 # ProcessPoolExecutor will not work in the interactive interpreter.
52- # On Linux the whole environment is forked, so the issue does
53- # not appear.
52+ # On Linux the whole process is forked, so the issue does not appear.
5453 # See https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor
54+ # and https://github.com/python-adaptive/adaptive/issues/301
5555 _default_executor = loky .get_reusable_executor
5656
5757
@@ -69,7 +69,8 @@ class BaseRunner(metaclass=abc.ABCMeta):
6969 `mpi4py.futures.MPIPoolExecutor`, `ipyparallel.Client` or\
7070 `loky.get_reusable_executor`, optional
7171 The executor in which to evaluate the function to be learned.
72- If not provided, a new `~concurrent.futures.ProcessPoolExecutor`.
72+ If not provided, a new `~concurrent.futures.ProcessPoolExecutor` on
73+ Linux, and a `loky.get_reusable_executor` on MacOS and Windows.
7374 ntasks : int, optional
7475 The number of concurrent function evaluations. Defaults to the number
7576 of cores available in `executor`.
@@ -321,7 +322,8 @@ class BlockingRunner(BaseRunner):
321322 `mpi4py.futures.MPIPoolExecutor`, `ipyparallel.Client` or\
322323 `loky.get_reusable_executor`, optional
323324 The executor in which to evaluate the function to be learned.
324- If not provided, a new `~concurrent.futures.ProcessPoolExecutor`.
325+ If not provided, a new `~concurrent.futures.ProcessPoolExecutor` on
326+ Linux, and a `loky.get_reusable_executor` on MacOS and Windows.
325327 ntasks : int, optional
326328 The number of concurrent function evaluations. Defaults to the number
327329 of cores available in `executor`.
@@ -437,7 +439,8 @@ class AsyncRunner(BaseRunner):
437439 `mpi4py.futures.MPIPoolExecutor`, `ipyparallel.Client` or\
438440 `loky.get_reusable_executor`, optional
439441 The executor in which to evaluate the function to be learned.
440- If not provided, a new `~concurrent.futures.ProcessPoolExecutor`.
442+ If not provided, a new `~concurrent.futures.ProcessPoolExecutor` on
443+ Linux, and a `loky.get_reusable_executor` on MacOS and Windows.
441444 ntasks : int, optional
442445 The number of concurrent function evaluations. Defaults to the number
443446 of cores available in `executor`.
0 commit comments