vstinner
bpo-39511GH-18296
PyThreadState.on_delete is a callback used to notify Python when a thread completes. _thread._set_sentinel() function creates a lock which is released when the thread completes. It sets on_delete callback to the internal release_sentinel() function. This lock is known as Threading._tstate_lock in the threading module. The release_sentinel() function uses the Python C API. The problem is that on_delete is called late in the Python finalization, when the C API is no longer fully working. The PyThreadState_Clear() function now calls the PyThreadState.on_delete callback. Previously, that happened in PyThreadState_Delete(). The release_sentinel() function is now called when the C API is still fully working.
| Type | Name | Latest commit message | Commit time |
|---|---|---|---|
| .. | |||
| Failed to load latest commit information. | |||
|
|
clinic |
|
|
|
|
Python-ast.c |
|
|
|
|
README |
|
|
|
|
_warnings.c |
|
|
|
|
asdl.c |
|
|
|
|
ast.c |
|
|
|
|
ast_opt.c |
|
|
|
|
ast_unparse.c |
|
|
|
|
bltinmodule.c |
|
|
|
|
bootstrap_hash.c |
|
|
|
|
ceval.c |
|
|
|
|
ceval_gil.h |
|
|
|
|
codecs.c |
|
|
|
|
compile.c |
|
|
|
|
condvar.h |
|
|
|
|
context.c |
|
|
|
|
dtoa.c |
|
|
|
|
dup2.c |
|
|
|
|
dynamic_annotations.c |
|
|
|
|
dynload_aix.c |
|
|
|
|
dynload_dl.c |
|
|
|
|
dynload_hpux.c |
|
|
|
|
dynload_shlib.c |
|
|
|
|
dynload_stub.c |
|
|
|
|
dynload_win.c |
|
|
|
|
errors.c |
|
|
|
|
fileutils.c |
|
|
|
|
formatter_unicode.c |
|
|
|
|
frozen.c |
|
|
|
|
frozenmain.c |
|
|
|
|
future.c |
|
|
|
|
getargs.c |
|
|
|
|
getcompiler.c |
|
|
|
|
getcopyright.c |
|
|
|
|
getopt.c |
|
|
|
|
getplatform.c |
|
|
|
|
getversion.c |
|
|
|
|
graminit.c |
|
|
|
|
hamt.c |
|
|
|
|
import.c |
|
|
|
|
importdl.c |
|
|
|
|
importdl.h |
|
|
|
|
importlib.h |
|
|
|
|
importlib_external.h |
|
|
|
|
importlib_zipimport.h |
|
|
|
|
initconfig.c |
|
|
|
|
makeopcodetargets.py |
|
|
|
|
marshal.c |
|
|
|
|
modsupport.c |
|
|
|
|
mysnprintf.c |
|
|
|
|
mystrtoul.c |
|
|
|
|
opcode_targets.h |
|
|
|
|
pathconfig.c |
|
|
|
|
peephole.c |
|
|
|
|
preconfig.c |
|
|
|
|
pyarena.c |
|
|
|
|
pyctype.c |
|
|
|
|
pyfpe.c |
|
|
|
|
pyhash.c |
|
|
|
|
pylifecycle.c |
|
|
|
|
pymath.c |
|
|
|
|
pystate.c |
|
|
|
|
pystrcmp.c | ||
|
|
pystrhex.c |
|
|
|
|
pystrtod.c |
|
|
|
|
pythonrun.c |
|
|
|
|
pytime.c |
|
|
|
|
strdup.c |
|
|
|
|
structmember.c |
|
|
|
|
symtable.c |
|
|
|
|
sysmodule.c |
|
|
|
|
thread.c |
|
|
|
|
thread_nt.h |
|
|
|
|
thread_pthread.h |
|
|
|
|
traceback.c |
|
|
|
|
wordcode_helpers.h |
|
|
README
Miscellaneous source files for the main Python shared library