[issue33777] dummy_threading: .is_alive method returns True after execution has completed
Nate Atkinson added the comment: 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. -- ___ Python tracker <https://bugs.python.org/issue33777> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33777] dummy_threading: .is_alive method returns True after execution has completed
Nate Atkinson added the comment: I notice that I maybe have inadvertently assigned this to the wrong group. I suspect that this should apply to the "Library" rather than "Core". Sorry! -- ___ Python tracker <https://bugs.python.org/issue33777> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33777] dummy_threading: .is_alive method returns True after execution has completed
New submission from Nate Atkinson : Here's what I expect to happen (Python2 behavior): Python 2.7.14+ (default, Dec 5 2017, 15:17:02) [GCC 7.2.0] on linux2 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() False >>> Here's what actually happens (Python3.6): Python 3.6.4 (default, Jan 5 2018, 02:13:53) [GCC 7.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 >>> After completion of the target function, I would expect .is_alive() to return False for an instance of dummy_thread.Thread. Instead, it returns True until the .join() method of the instance of dummy_thread.Thread is called. -- components: Interpreter Core messages: 318795 nosy: njatkinson priority: normal severity: normal status: open title: dummy_threading: .is_alive method returns True after execution has completed type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue33777> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com