summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-10 00:28:54 (GMT)
committerGitHub <noreply@github.com>2020-03-10 00:28:54 (GMT)
commitb4698ecfdb526e0a9f5fa6ef0f8e1d8cca500203 (patch)
treeb00c42490d6d76a45ce9301cc1fe35fe78a8ff9e /Doc/c-api
parent175a704abfcb3400aaeb66d4f098d92ca7e30892 (diff)
downloadcpython-b4698ecfdb526e0a9f5fa6ef0f8e1d8cca500203.zip
cpython-b4698ecfdb526e0a9f5fa6ef0f8e1d8cca500203.tar.gz
cpython-b4698ecfdb526e0a9f5fa6ef0f8e1d8cca500203.tar.bz2
bpo-39877: Deprecate PyEval_InitThreads() (GH-18892)
Deprecated PyEval_InitThreads() and PyEval_ThreadsInitialized(). Calling PyEval_InitThreads() now does nothing.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/init.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 14049ee..c34b117 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -842,12 +842,12 @@ code, or when embedding the Python interpreter:
single: PyEval_SaveThread()
single: PyEval_RestoreThread()
- Initialize and acquire the global interpreter lock. It should be called in the
- main thread before creating a second thread or engaging in any other thread
- operations such as ``PyEval_ReleaseThread(tstate)``. It is not needed before
- calling :c:func:`PyEval_SaveThread` or :c:func:`PyEval_RestoreThread`.
+ Deprecated function which does nothing.
- This is a no-op when called for a second time.
+ In Python 3.6 and older, this function created the GIL if it didn't exist.
+
+ .. versionchanged:: 3.9
+ The function now does nothing.
.. versionchanged:: 3.7
This function is now called by :c:func:`Py_Initialize()`, so you don't
@@ -856,6 +856,8 @@ code, or when embedding the Python interpreter:
.. versionchanged:: 3.2
This function cannot be called before :c:func:`Py_Initialize()` anymore.
+ .. deprecated-removed:: 3.9 3.11
+
.. index:: module: _thread
@@ -868,6 +870,8 @@ code, or when embedding the Python interpreter:
.. versionchanged:: 3.7
The :term:`GIL` is now initialized by :c:func:`Py_Initialize()`.
+ .. deprecated-removed:: 3.9 3.11
+
.. c:function:: PyThreadState* PyEval_SaveThread()