Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1225,9 +1225,23 @@ code, or when embedding the Python interpreter:
The :term:`GIL` does not need to be held, but will be held upon returning
if *tstate* is non-``NULL``.


The following functions use thread-local storage, and are not compatible
Comment thread
StanFromIreland marked this conversation as resolved.
Outdated
with sub-interpreters:

.. c:type:: PyGILState_STATE

The type of the value returned by :c:func:`PyGILState_Ensure` and passed to
:c:func:`PyGILState_Release`.

.. c:enumerator:: PyGILState_LOCKED

The GIL was already held when :c:func:`PyGILState_Ensure` was called.

.. c:enumerator:: PyGILState_UNLOCKED

The GIL was not held when :c:func:`PyGILState_Ensure` was called.

.. c:function:: PyGILState_STATE PyGILState_Ensure()

Ensure that the current thread is ready to call the Python C API regardless
Expand Down Expand Up @@ -1372,11 +1386,11 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
must be held.

.. versionchanged:: 3.9
This function now calls the :c:member:`PyThreadState.on_delete` callback.
This function now calls the :c:member:`!PyThreadState.on_delete` callback.
Previously, that happened in :c:func:`PyThreadState_Delete`.

.. versionchanged:: 3.13
The :c:member:`PyThreadState.on_delete` callback was removed.
The :c:member:`!PyThreadState.on_delete` callback was removed.


.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)
Expand Down
1 change: 0 additions & 1 deletion Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Doc/c-api/descriptor.rst
Doc/c-api/float.rst
Doc/c-api/init.rst
Doc/c-api/init_config.rst
Doc/c-api/intro.rst
Doc/c-api/module.rst
Expand Down
Loading