Index: Lib/threading.py =================================================================== --- Lib/threading.py (revision 66872) +++ Lib/threading.py (working copy) @@ -733,10 +733,10 @@ def __init__(self): Thread.__init__(self, name="MainThread") - self._Thread__started.set() _active_limbo_lock.acquire() _active[_get_ident()] = self _active_limbo_lock.release() + self._Thread__started.set() def _set_daemon(self): return False @@ -779,10 +779,10 @@ # instance is immortal, that's bad, so release this resource. del self._Thread__block - self._Thread__started.set() _active_limbo_lock.acquire() _active[_get_ident()] = self _active_limbo_lock.release() + self._Thread__started.set() def _set_daemon(self): return True