Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 54454e7

Browse files
committed
Issue #14881: Allow normal non-main thread to spawn a dummy process
Fix suggested by Itay Brandes
1 parent 2cc7156 commit 54454e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/multiprocessing/dummy/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def __init__(self, group=None, target=None, name=None, args=(), kwargs={}):
7070
def start(self):
7171
assert self._parent is current_process()
7272
self._start_called = True
73-
self._parent._children[self] = None
73+
if hasattr(self._parent, '_children'):
74+
self._parent._children[self] = None
7475
threading.Thread.start(self)
7576

7677
@property

0 commit comments

Comments
 (0)