We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a81fea commit a474e29Copy full SHA for a474e29
1 file changed
adaptive/runner.py
@@ -8,6 +8,7 @@
8
import itertools
9
import pickle
10
import platform
11
+import sys
12
import time
13
import traceback
14
import warnings
@@ -44,12 +45,9 @@
44
45
46
47
# -- Runner definitions
-# Check if InterpreterPoolExecutor is available (Python 3.14+)
48
-_has_interpreter_pool = hasattr(concurrent, "InterpreterPoolExecutor")
+_has_interpreter_pool = sys.version_info >= (3, 14)
49
50
if _has_interpreter_pool:
51
- # Use InterpreterPoolExecutor for Python 3.14+
52
- # It provides better isolation and performance than ProcessPoolExecutor
53
_default_executor = concurrent.InterpreterPoolExecutor # type: ignore[misc,attr-defined]
54
elif platform.system() == "Linux":
55
_default_executor = concurrent.ProcessPoolExecutor # type: ignore[misc]
0 commit comments