Message341368
This behavior still exists in 3.7.3:
Python 3.7.3 (default, May 1 2019, 00:00:47)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
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
It is inconsistent with the threading module behavior (which matches the 2.x behavior):
Python 3.7.3 (default, May 1 2019, 00:00:47)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from threading import Thread
>>> def f(): print('foo')
...
>>> t = Thread(target=f)
>>> t.start()
foo
>>> t.is_alive()
False
>>> t.join()
>>> t.is_alive()
False
I would classify this as a bug since the documentation claims the dummy_threading module is supposed to be a drop-in replacement for the threading module. |
|
Date |
User |
Action |
Args |
2019-05-04 01:27:55 | Jeffrey.Kintscher | set | recipients:
+ Jeffrey.Kintscher, pitrou, xiang.zhang, njatkinson, xtreak |
2019-05-04 01:27:55 | Jeffrey.Kintscher | set | messageid: <1556933275.6.0.144381807096.issue33777@roundup.psfhosted.org> |
2019-05-04 01:27:55 | Jeffrey.Kintscher | link | issue33777 messages |
2019-05-04 01:27:55 | Jeffrey.Kintscher | create | |
|