This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients Dustin.Kirkland, cooyeah, neologix, pitrou, sbt
Date 2012-04-19.21:11:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Here is a complete patch + tests for 2.7.

I like the test.

However there's something I find strange with the patch:
diff --git a/Lib/ b/Lib/
--- a/Lib/
+++ b/Lib/
@@ -887,7 +887,7 @@ def _after_fork():
                 ident = _get_ident()
                 thread._Thread__ident = ident
                 new_active[ident] = thread
-            else:
+            elif not isinstance(thread, _DummyThread):
                 # All the others are already stopped.

Is it really the caller's job to check that the thread is not a dummy thread?
IMO it should be _DummyThread's stop() method that does the right thing, either by overriding Thread's stop() method in _DummyThread or by puting the check inside Thread.stop(), like what's done inside thread._reset_internal_locks():
         if hasattr(self, '_Thread__block'):  # DummyThread deletes self.__block
Date User Action Args
2012-04-19 21:11:13neologixsetrecipients: + neologix, pitrou, cooyeah, sbt, Dustin.Kirkland
2012-04-19 21:11:13neologixsetmessageid: <>
2012-04-19 21:11:13neologixlinkissue14308 messages
2012-04-19 21:11:13neologixcreate