Message256094
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]." |
|
Date |
User |
Action |
Args |
2015-12-08 00:03:40 | anthonygreen | set | recipients:
+ anthonygreen, pitrou, docs@python |
2015-12-08 00:03:40 | anthonygreen | set | messageid: <1449533020.35.0.749010589041.issue25821@psf.upfronthosting.co.za> |
2015-12-08 00:03:40 | anthonygreen | link | issue25821 messages |
2015-12-08 00:03:40 | anthonygreen | create | |
|