Issue #14881: Allow normal non-main thread to spawn a dummy process

Fix suggested by Itay Brandes
This commit is contained in:
Richard Oudkerk 2012-05-25 12:56:33 +01:00
parent 877effc298
commit 6a942528ec
1 changed files with 2 additions and 1 deletions

View File

@ -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