[Python-checkins] cpython (3.2): Issue #14881: Allow normal non-main thread to spawn a dummy process

richard.oudkerk python-checkins at python.org
Fri May 25 14:06:42 CEST 2012


http://hg.python.org/cpython/rev/0528ec18e230
changeset:   77138:0528ec18e230
branch:      3.2
parent:      77135:8a58670048c9
user:        Richard Oudkerk <shibturn at gmail.com>
date:        Fri May 25 12:57:58 2012 +0100
summary:
  Issue #14881: Allow normal non-main thread to spawn a dummy process

Fix suggested by Itay Brandes

files:
  Lib/multiprocessing/dummy/__init__.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py
--- a/Lib/multiprocessing/dummy/__init__.py
+++ b/Lib/multiprocessing/dummy/__init__.py
@@ -70,7 +70,8 @@
     def start(self):
         assert self._parent is current_process()
         self._start_called = True
-        self._parent._children[self] = None
+        if hasattr(self._parent, '_children'):
+            self._parent._children[self] = None
         threading.Thread.start(self)
 
     @property

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list