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 anthonygreen
Recipients anthonygreen, docs@python, pitrou
Date 2015-12-08.00:03:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449533020.35.0.749010589041.issue25821@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation at https://docs.python.org/3/library/threading.html#threading.Thread.is_alive relates:

> The module function enumerate() returns a list of all alive threads.

The documentation at https://docs.python.org/3/library/threading.html#threading.enumerate relates:

> Return a list of all Thread objects currently alive. The list includes daemonic threads, dummy thread objects created by current_thread(), and the main thread.

This is a contradiction, since if the main thread has stopped, is_alive(main_thread) will return False, but it will still be included in the list returned by threading.enumerate.

Note that this is not a TOCTTOU issue. The issue is that enumerate actually includes "all alive threads, plus one [or more? I can't tell from the code] other[s]."
History
Date User Action Args
2015-12-08 00:03:40anthonygreensetrecipients: + anthonygreen, pitrou, docs@python
2015-12-08 00:03:40anthonygreensetmessageid: <1449533020.35.0.749010589041.issue25821@psf.upfronthosting.co.za>
2015-12-08 00:03:40anthonygreenlinkissue25821 messages
2015-12-08 00:03:40anthonygreencreate