Message318795
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. |
|
Date |
User |
Action |
Args |
2018-06-06 02:00:05 | njatkinson | set | recipients:
+ njatkinson |
2018-06-06 02:00:05 | njatkinson | set | messageid: <1528250405.09.0.592728768989.issue33777@psf.upfronthosting.co.za> |
2018-06-06 02:00:05 | njatkinson | link | issue33777 messages |
2018-06-06 02:00:04 | njatkinson | create | |
|