]> granicus.if.org Git - python/commitdiff
bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual environmen...
authorSteve Dower <steve.dower@python.org>
Fri, 13 Sep 2019 16:40:19 +0000 (17:40 +0100)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 13 Sep 2019 16:40:19 +0000 (09:40 -0700)
https://bugs.python.org/issue38092

Lib/multiprocessing/popen_spawn_win32.py
Lib/multiprocessing/spawn.py
Misc/NEWS.d/next/Windows/2019-09-13-14-11-42.bpo-38092.x31ehI.rst [new file with mode: 0644]

index ea9c555da39a3c4601ef72b02342832fc15f276b..9c4098d0fa4f1e6e3ec94ecc8e596dd3857d741f 100644 (file)
@@ -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)
index 7cc129e2610761f3868523030ea4fa60ec9d844b..075f3455478b52ab84579cdd5d0eab9d3fccf70a 100644 (file)
@@ -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 (file)
index 0000000..48e83c8
--- /dev/null
@@ -0,0 +1 @@
+Reduce overhead when using multiprocessing in a Windows virtual environment.