Issue #10913: Deprecate misleading functions PyEval_AcquireLock() and
PyEval_ReleaseLock(). The thread-state aware APIs should be used instead.
This commit is contained in:
parent
bedd2c2d88
commit
5ace8e98da
|
@ -759,6 +759,10 @@ been created.
|
||||||
*tstate*, which should not be *NULL*. The lock must have been created earlier.
|
*tstate*, which should not be *NULL*. The lock must have been created earlier.
|
||||||
If this thread already has the lock, deadlock ensues.
|
If this thread already has the lock, deadlock ensues.
|
||||||
|
|
||||||
|
:c:func:`PyEval_RestoreThread` is a higher-level function which is always
|
||||||
|
available (even when thread support isn't enabled or when threads have
|
||||||
|
not been initialized).
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: void PyEval_ReleaseThread(PyThreadState *tstate)
|
.. c:function:: void PyEval_ReleaseThread(PyThreadState *tstate)
|
||||||
|
|
||||||
|
@ -768,17 +772,31 @@ been created.
|
||||||
that it represents the current thread state --- if it isn't, a fatal error is
|
that it represents the current thread state --- if it isn't, a fatal error is
|
||||||
reported.
|
reported.
|
||||||
|
|
||||||
|
:c:func:`PyEval_SaveThread` is a higher-level function which is always
|
||||||
|
available (even when thread support isn't enabled or when threads have
|
||||||
|
not been initialized).
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: void PyEval_AcquireLock()
|
.. c:function:: void PyEval_AcquireLock()
|
||||||
|
|
||||||
Acquire the global interpreter lock. The lock must have been created earlier.
|
Acquire the global interpreter lock. The lock must have been created earlier.
|
||||||
If this thread already has the lock, a deadlock ensues.
|
If this thread already has the lock, a deadlock ensues.
|
||||||
|
|
||||||
|
.. deprecated:: 3.2
|
||||||
|
This function does not change the current thread state. Please use
|
||||||
|
:c:func:`PyEval_RestoreThread` or :c:func:`PyEval_AcquireThread`
|
||||||
|
instead.
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: void PyEval_ReleaseLock()
|
.. c:function:: void PyEval_ReleaseLock()
|
||||||
|
|
||||||
Release the global interpreter lock. The lock must have been created earlier.
|
Release the global interpreter lock. The lock must have been created earlier.
|
||||||
|
|
||||||
|
.. deprecated:: 3.2
|
||||||
|
This function does not change the current thread state. Please use
|
||||||
|
:c:func:`PyEval_SaveThread` or :c:func:`PyEval_ReleaseThread`
|
||||||
|
instead.
|
||||||
|
|
||||||
|
|
||||||
Sub-interpreter support
|
Sub-interpreter support
|
||||||
=======================
|
=======================
|
||||||
|
|
|
@ -200,6 +200,9 @@ Library
|
||||||
C-API
|
C-API
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #10913: Deprecate misleading functions PyEval_AcquireLock() and
|
||||||
|
PyEval_ReleaseLock(). The thread-state aware APIs should be used instead.
|
||||||
|
|
||||||
- Issue #10333: Remove ancient GC API, which has been deprecated since
|
- Issue #10333: Remove ancient GC API, which has been deprecated since
|
||||||
Python 2.2.
|
Python 2.2.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue