Author njatkinson
Recipients njatkinson, pitrou, xiang.zhang, xtreak
Date 2019-04-21.07:17:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555831073.49.0.37583781878.issue33777@roundup.psfhosted.org>
In-reply-to
Content
To be clear-- is_alive() doesn't *always* return True. It returns True until .join() is called.


Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dummy_threading import Thread
>>> def f(): print('foo')
...
>>> t = Thread(target=f)
>>> t.start()
foo
>>> t.is_alive()
True
>>> t.join()
>>> t.is_alive()
False



I would expect is_alive to return True while the target function is executing and return False after the execution has completed. Instead, .is_alive is continuing to return True after execution of the target function has completed.
History
Date User Action Args
2019-04-21 07:17:53njatkinsonsetrecipients: + njatkinson, pitrou, xiang.zhang, xtreak
2019-04-21 07:17:53njatkinsonsetmessageid: <1555831073.49.0.37583781878.issue33777@roundup.psfhosted.org>
2019-04-21 07:17:53njatkinsonlinkissue33777 messages
2019-04-21 07:17:53njatkinsoncreate