bpo-39877: Deprecate PyEval_InitThreads() by vstinner · Pull Request #18892 · python/cpython
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
.. deprecated-removed:: 3.9 3.11
.. index:: module: _thread
.. deprecated-removed:: 3.9 3.11
.. c:function:: PyThreadState* PyEval_SaveThread()