diff options
author | Steve Dower <steve.dower@python.org> | 2019-09-13 16:40:19 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-09-13 16:40:19 (GMT) |
commit | f2b7556ef851ac85e7cbf189d1b29fdeb9539b88 (patch) | |
tree | 9edb116c3709bec6acbadf309788da6d4e8a9771 | |
parent | 5b9ff7a0dcb16d6f5c3cd4f1f52e0ca6a4bde586 (diff) | |
download | cpython-f2b7556ef851ac85e7cbf189d1b29fdeb9539b88.zip cpython-f2b7556ef851ac85e7cbf189d1b29fdeb9539b88.tar.gz cpython-f2b7556ef851ac85e7cbf189d1b29fdeb9539b88.tar.bz2 |
bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual environment (GH-16098)
https://bugs.python.org/issue38092
-rw-r--r-- | Lib/multiprocessing/popen_spawn_win32.py | 2 | ||||
-rw-r--r-- | Lib/multiprocessing/spawn.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Windows/2019-09-13-14-11-42.bpo-38092.x31ehI.rst | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/Lib/multiprocessing/popen_spawn_win32.py b/Lib/multiprocessing/popen_spawn_win32.py index ea9c555..9c4098d 100644 --- a/Lib/multiprocessing/popen_spawn_win32.py +++ b/Lib/multiprocessing/popen_spawn_win32.py @@ -72,7 +72,7 @@ class Popen(object): try: hp, ht, pid, tid = _winapi.CreateProcess( python_exe, cmd, - env, None, False, 0, None, None, None) + None, None, False, 0, env, None, None) _winapi.CloseHandle(ht) except: _winapi.CloseHandle(rhandle) diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py index 7cc129e..075f345 100644 --- a/Lib/multiprocessing/spawn.py +++ b/Lib/multiprocessing/spawn.py @@ -36,7 +36,7 @@ else: if WINSERVICE: _python_exe = os.path.join(sys.exec_prefix, 'python.exe') else: - _python_exe = sys.executable + _python_exe = sys._base_executable def set_executable(exe): global _python_exe diff --git a/Misc/NEWS.d/next/Windows/2019-09-13-14-11-42.bpo-38092.x31ehI.rst b/Misc/NEWS.d/next/Windows/2019-09-13-14-11-42.bpo-38092.x31ehI.rst new file mode 100644 index 0000000..48e83c8 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2019-09-13-14-11-42.bpo-38092.x31ehI.rst @@ -0,0 +1 @@ +Reduce overhead when using multiprocessing in a Windows virtual environment. |