Commit f2b7556e authored by Steve Dower's avatar Steve Dower Committed by Miss Islington (bot)

bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual environment (GH-16098)



https://bugs.python.org/issue38092
parent 5b9ff7a0
...@@ -72,7 +72,7 @@ class Popen(object): ...@@ -72,7 +72,7 @@ class Popen(object):
try: try:
hp, ht, pid, tid = _winapi.CreateProcess( hp, ht, pid, tid = _winapi.CreateProcess(
python_exe, cmd, python_exe, cmd,
env, None, False, 0, None, None, None) None, None, False, 0, env, None, None)
_winapi.CloseHandle(ht) _winapi.CloseHandle(ht)
except: except:
_winapi.CloseHandle(rhandle) _winapi.CloseHandle(rhandle)
......
...@@ -36,7 +36,7 @@ else: ...@@ -36,7 +36,7 @@ else:
if WINSERVICE: if WINSERVICE:
_python_exe = os.path.join(sys.exec_prefix, 'python.exe') _python_exe = os.path.join(sys.exec_prefix, 'python.exe')
else: else:
_python_exe = sys.executable _python_exe = sys._base_executable
def set_executable(exe): def set_executable(exe):
global _python_exe global _python_exe
......
Reduce overhead when using multiprocessing in a Windows virtual environment.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment