8000 bpo-38092: Reduce overhead when using multiprocessing in a Windows vi… · python/cpython@f2b7556 · GitHub
[go: up one dir, main page]

Skip to content

Commit f2b7556

Browse files
zoobamiss-islington
authored andcommitted
bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual environment (GH-16098)
https://bugs.python.org/issue38092
1 parent 5b9ff7a commit f2b7556

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Lib/multiprocessing/popen_spawn_win32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, process_obj):
7272
try:
7373
hp, ht, pid, tid = _winapi.CreateProcess(
7474
python_exe, cmd,
75-
env, None, False, 0, None, None, None)
75+
None, None, False, 0, env, None, None)
7676
_winapi.CloseHandle(ht)
7777
except:
7878
_winapi.CloseHandle(rhandle)

Lib/multiprocessing/spawn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
if WINSERVICE:
3737
_python_exe = os.path.join(sys.exec_prefix, 'python.exe')
3838
else:
39-
_python_exe = sys.executable
39+
_python_exe = sys._base_executable
4040

4141
def set_executable(exe):
4242
global _python_exe
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reduce overhead when using multiprocessing in a Windows virtual environment.

0 commit comments

Comments
 (0)
0