summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/dummy
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-05-25 11:57:58 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2012-05-25 11:57:58 (GMT)
commit54454e7dc25f8ce5aef87a4faed89aca19067815 (patch)
tree19f96f0227ad0798a7323ae19d1d55e8d25102fa /Lib/multiprocessing/dummy
parent2cc71565154b2092da9b15e205567c13e07f331a (diff)
downloadcpython-54454e7dc25f8ce5aef87a4faed89aca19067815.zip
cpython-54454e7dc25f8ce5aef87a4faed89aca19067815.tar.gz
cpython-54454e7dc25f8ce5aef87a4faed89aca19067815.tar.bz2
Issue #14881: Allow normal non-main thread to spawn a dummy process
Fix suggested by Itay Brandes
Diffstat (limited to 'Lib/multiprocessing/dummy')
-rw-r--r--Lib/multiprocessing/dummy/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py
index c4933d9..101c3cb 100644
--- a/Lib/multiprocessing/dummy/__init__.py
+++ b/Lib/multiprocessing/dummy/__init__.py
@@ -70,7 +70,8 @@ class DummyProcess(threading.Thread):
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