Staging
v0.5.1
https://github.com/python/cpython
Revision 6eb2878e42152e9c45d7ee5e6f889532d753e67c authored by Miss Islington (bot) on 13 June 2019, 12:22:20 UTC, committed by Victor Stinner on 13 June 2019, 12:22:20 UTC
* bpo-36402: Fix threading._shutdown() race condition (GH-13948)

Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.

* Add threading._shutdown_locks: set of Thread._tstate_lock locks
  of non-daemon threads used by _shutdown() to wait until all Python
  thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
  threading._shutdown_locks.
* Add test_finalization_shutdown() test.

(cherry picked from commit 468e5fec8a2f534f1685d59da3ca4fad425c38dd)

* bpo-36402: Fix threading.Thread._stop() (GH-14047)

Remove the _tstate_lock from _shutdown_locks, don't remove None.

(cherry picked from commit 6f75c873752a16a7ad8f35855b1e29f59d048e84)
(cherry picked from commit e40a97a721d46307dfdc2b0322028ccded6eb571)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
1 parent b4c8ef7
History
Tip revision: 6eb2878e42152e9c45d7ee5e6f889532d753e67c authored by Miss Islington (bot) on 13 June 2019, 12:22:20 UTC
bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050) (GH-14054)
Tip revision: 6eb2878
File Mode Size
clinic
stringlib
README -rw-r--r-- 41 bytes
abstract.c -rw-r--r-- 66.8 KB
accu.c -rw-r--r-- 2.4 KB
boolobject.c -rw-r--r-- 6.5 KB
bytearrayobject.c -rw-r--r-- 69.2 KB
bytes_methods.c -rw-r--r-- 22.4 KB
bytesobject.c -rw-r--r-- 99.1 KB
call.c -rw-r--r-- 37.2 KB
capsule.c -rw-r--r-- 7.3 KB
cellobject.c -rw-r--r-- 4.4 KB
classobject.c -rw-r--r-- 17.8 KB
codeobject.c -rw-r--r-- 27.3 KB
complexobject.c -rw-r--r-- 32.3 KB
descrobject.c -rw-r--r-- 54.9 KB
dict-common.h -rw-r--r-- 2.2 KB
dictnotes.txt -rw-r--r-- 6.0 KB
dictobject.c -rw-r--r-- 129.1 KB
enumobject.c -rw-r--r-- 13.3 KB
exceptions.c -rw-r--r-- 85.8 KB
fileobject.c -rw-r--r-- 14.9 KB
floatobject.c -rw-r--r-- 71.1 KB
frameobject.c -rw-r--r-- 34.4 KB
funcobject.c -rw-r--r-- 29.5 KB
genobject.c -rw-r--r-- 64.9 KB
iterobject.c -rw-r--r-- 9.0 KB
listobject.c -rw-r--r-- 95.4 KB
listsort.txt -rw-r--r-- 35.3 KB
lnotab_notes.txt -rw-r--r-- 5.7 KB
longobject.c -rw-r--r-- 166.4 KB
memoryobject.c -rw-r--r-- 88.9 KB
methodobject.c -rw-r--r-- 9.1 KB
moduleobject.c -rw-r--r-- 23.3 KB
namespaceobject.c -rw-r--r-- 7.2 KB
object.c -rw-r--r-- 61.7 KB
obmalloc.c -rw-r--r-- 84.3 KB
odictobject.c -rw-r--r-- 73.1 KB
rangeobject.c -rw-r--r-- 34.3 KB
setobject.c -rw-r--r-- 73.2 KB
sliceobject.c -rw-r--r-- 19.0 KB
structseq.c -rw-r--r-- 13.2 KB
tupleobject.c -rw-r--r-- 29.9 KB
typeobject.c -rw-r--r-- 239.8 KB
typeslots.inc -rw-r--r-- 3.9 KB
typeslots.py -rwxr-xr-x 1.2 KB
unicodectype.c -rw-r--r-- 7.5 KB
unicodeobject.c -rw-r--r-- 454.4 KB
unicodetype_db.h -rw-r--r-- 241.6 KB
weakrefobject.c -rw-r--r-- 29.5 KB

README

back to top