cpython/Doc/c-api
Victor Stinner 4d96b4635a
bpo-39511: PyThreadState_Clear() calls on_delete (GH-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.
2020-02-01 02:30:25 +01:00
..
abstract.rst bpo-36974: expand call protocol documentation (GH-13844) 2019-11-12 05:08:00 -08:00
allocation.rst bpo-37432: Doc: Fix signature of PyObject_Del() (GH-14430) 2019-06-28 18:02:56 +09:00
apiabiversion.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
arg.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
bool.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
buffer.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
bytearray.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
bytes.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
call.rst bpo-36974: expand call protocol documentation (GH-13844) 2019-11-12 05:08:00 -08:00
capsule.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
cell.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
code.rst Fix the miscellaneous typo (GH-17700) 2019-12-25 07:39:35 -08:00
codec.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
complex.rst bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108) 2019-06-02 00:05:48 +03:00
concrete.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
contextvars.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
conversion.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
coro.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
datetime.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
descriptor.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
dict.rst bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220) 2020-01-29 21:20:53 +10:00
exceptions.rst bpo-36974: expand call protocol documentation (GH-13844) 2019-11-12 05:08:00 -08:00
file.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
float.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
function.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
gcsupport.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
gen.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
import.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
index.rst bpo-36763: Implement the PEP 587 (GH-13592) 2019-05-27 16:39:22 +02:00
init.rst bpo-39511: PyThreadState_Clear() calls on_delete (GH-18296) 2020-02-01 02:30:25 +01:00
init_config.rst bpo-39429: Add a new "Python Development Mode" doc page (GH-18132) 2020-01-24 10:22:18 +01:00
intro.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
iter.rst Minor C API documentation improvements. (GH-17696) 2019-12-24 22:25:56 -06:00
iterator.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
list.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
long.rst PyLong_AsLongLong() docs should say 'long long' (#18082) 2020-01-21 19:14:13 +00:00
mapping.rst bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220) 2020-01-29 21:20:53 +10:00
marshal.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
memory.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
memoryview.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
method.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
module.rst bpo-38159: Clarify documentation of PyState_AddModule (GH-16101) 2019-11-01 16:47:05 +01:00
none.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
number.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
objbuffer.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
object.rst bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220) 2020-01-29 21:20:53 +10:00
objimpl.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
refcounting.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
reflection.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
sequence.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
set.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
slice.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00
stable.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
structures.rst bpo-39136: Fixed typos (GH-17720) 2019-12-28 17:16:02 -05:00
sys.rst bpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a deprecation warning (GH-17540) 2019-12-09 11:05:39 -08:00
tuple.rst bpo-38650: Constify PyStructSequence_UnnamedField. (GH-17005) 2019-11-16 18:55:29 +02:00
type.rst bpo-36974: expand call protocol documentation (GH-13844) 2019-11-12 05:08:00 -08:00
typeobj.rst Fix quoted signature of setattrofunc (GH-17251) 2019-11-22 14:48:14 +01:00
unicode.rst bpo-38896: Remove PyUnicode_ClearFreeList() function (GH-17354) 2019-11-23 02:30:32 +01:00
utilities.rst Doc: Replace the deprecated highlightlang directive by highlight. (#13377) 2019-05-17 15:25:34 +05:30
veryhigh.rst bpo-38600: NULL -> ``NULL``. (GH-17001) 2019-10-30 21:37:16 +02:00
weakref.rst bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) 2019-10-30 12:03:20 +02:00