Skip to content

Commit 276d070

Browse files
Remove usage of "attached thread state"
1 parent c015ebd commit 276d070

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

Doc/c-api/init.rst

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,7 @@ These APIs are obsolete since Python 3.13 with the introduction of
25872587
On success, this function returns a lock; on failure, this
25882588
function returns ``0`` without an exception set.
25892589
2590-
The caller does not need to hold an :term:`attached thread state`.
2590+
The caller does not need to hold the :term:`GIL`.
25912591
25922592
.. versionchanged:: 3.15
25932593
This function now always uses :c:type:`PyMutex`. In prior versions, this
@@ -2599,7 +2599,7 @@ These APIs are obsolete since Python 3.13 with the introduction of
25992599
Destroy *lock*. The lock should not be held by any thread when calling
26002600
this.
26012601
2602-
The caller does not need to hold an :term:`attached thread state`.
2602+
The caller does not need to hold the :term:`GIL`.
26032603
26042604
26052605
.. c:function:: PyLockStatus PyThread_acquire_lock_timed(PyThread_type_lock lock, long long microseconds, int intr_flag)
@@ -2619,7 +2619,7 @@ These APIs are obsolete since Python 3.13 with the introduction of
26192619
If the lock is successfully acquired, this function returns
26202620
:c:enumerator:`PY_LOCK_ACQUIRED`.
26212621
2622-
The caller does not need to hold an :term:`attached thread state`.
2622+
The caller does not need to hold the :term:`GIL`.
26232623
26242624
26252625
.. c:function:: int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
@@ -2637,15 +2637,15 @@ These APIs are obsolete since Python 3.13 with the introduction of
26372637
Unlike :c:func:`PyThread_acquire_lock_timed`, acquiring the lock cannot be
26382638
interrupted by a signal.
26392639
2640-
The caller does not need to hold an :term:`attached thread state`.
2640+
The caller does not need to hold the :term:`GIL`.
26412641
26422642
26432643
.. c:function:: int PyThread_release_lock(PyThread_type_lock lock)
26442644
26452645
Release *lock*. If *lock* is not held, then this function issues a
26462646
fatal error.
26472647
2648-
The caller does not need to hold an :term:`attached thread state`.
2648+
The caller does not need to hold the :term:`GIL`.
26492649
26502650
26512651
Operating System Thread APIs
@@ -2668,15 +2668,15 @@ Operating System Thread APIs
26682668
On success, this function returns the identifier of the new thread; on failure,
26692669
this returns :c:macro:`PYTHREAD_INVALID_THREAD_ID`.
26702670
2671-
The caller does not need to hold an :term:`attached thread state`.
2671+
The caller does not need to hold the :term:`GIL`.
26722672
26732673
26742674
.. c:function:: unsigned long PyThread_get_thread_ident(void)
26752675
26762676
Return the identifier of the current thread, which will never be zero.
26772677
2678-
This function cannot fail, and the caller does not need to hold an
2679-
:term:`attached thread state`.
2678+
This function cannot fail, and the caller does not need to hold the
2679+
:term:`GIL`.
26802680
26812681
.. seealso::
26822682
:py:func:`threading.get_ident`
@@ -2691,7 +2691,7 @@ Operating System Thread APIs
26912691
On success, this returns a new :term:`strong reference` to the thread
26922692
information; on failure, this returns ``NULL`` with an exception set.
26932693
2694-
The caller must hold an :term:`attached thread state`.
2694+
The caller must hold the :term:`GIL`.
26952695
26962696
26972697
.. c:macro:: PY_HAVE_THREAD_NATIVE_ID
@@ -2707,8 +2707,8 @@ Operating System Thread APIs
27072707
This function is only available when :c:macro:`PY_HAVE_THREAD_NATIVE_ID` is
27082708
defined.
27092709
2710-
This function cannot fail, and the caller does not need to hold an
2711-
:term:`attached thread state`.
2710+
This function cannot fail, and the caller does not need to hold the
2711+
:term:`GIL`.
27122712
27132713
.. seealso::
27142714
:py:func:`threading.get_native_id`
@@ -2735,8 +2735,6 @@ Operating System Thread APIs
27352735
27362736
In any case, there is a risk of corruption on the thread's stack.
27372737
2738-
.. deprecated:: 3.14
2739-
27402738
27412739
.. c:function:: void PyThread_init_thread(void)
27422740
@@ -2752,12 +2750,12 @@ Operating System Thread APIs
27522750
``-2`` if the system does not support changing the stack size. This function
27532751
does not set exceptions.
27542752
2755-
The caller does not need to hold an :term:`attached thread state`.
2753+
The caller does not need to hold the :term:`GIL`.
27562754
27572755
27582756
.. c:function:: size_t PyThread_get_stacksize(void)
27592757
27602758
Return the stack size of the current thread in bytes, or ``0`` if the system's
27612759
default stack size is in use.
27622760
2763-
The caller does not need to hold an :term:`attached thread state`.
2761+
The caller does not need to hold the :term:`GIL`.

0 commit comments

Comments
 (0)