Skip to content

Commit ed550bc

Browse files
committed
Use a less wordy phrase for detaching.
1 parent 352acc5 commit ed550bc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Doc/c-api/init.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,11 +1033,11 @@ to be released to attach their thread state, allowing true multi-core parallelis
10331033
10341034
.. note::
10351035
Calling system I/O functions is the most common use case for detaching
1036-
the :term:`thread state`, but it can also be useful before calling
1036+
the :term:`thread state <attached thread state>`, but it can also be useful before calling
10371037
long-running computations which don't need access to Python objects, such
10381038
as compression or cryptographic functions operating over memory buffers.
10391039
For example, the standard :mod:`zlib` and :mod:`hashlib` modules detach the
1040-
:term:`attached thread state` when compressing or hashing data.
1040+
:term:`thread state <attached thread state>` when compressing or hashing data.
10411041
10421042
10431043
.. _gilstate:
@@ -2394,7 +2394,7 @@ The C-API provides a basic mutual exclusion lock.
23942394
23952395
Lock mutex *m*. If another thread has already locked it, the calling
23962396
thread will block until the mutex is unlocked. While blocked, the thread
2397-
will temporarily detach the :term:`attached thread state` if one exists.
2397+
will temporarily detach the :term:`thread state <attached thread state>` if one exists.
23982398
23992399
.. versionadded:: 3.13
24002400

Doc/extending/newtypes_tutorial.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ But this would be risky. Our type doesn't restrict the type of the
404404
``first`` member, so it could be any kind of object. It could have a
405405
destructor that causes code to be executed that tries to access the
406406
``first`` member; or that destructor could detach the
407-
:term:`attached thread state` and let arbitrary code run in other
407+
:term:`thread state <attached thread state>` and let arbitrary code run in other
408408
threads that accesses and modifies our object.
409409

410410
To be paranoid and protect ourselves against this possibility, we almost
@@ -414,7 +414,7 @@ don't we have to do this?
414414
* when we absolutely know that the reference count is greater than 1;
415415

416416
* when we know that deallocation of the object [#]_ will neither detach
417-
the :term:`attached thread state` nor cause any calls back into our type's code;
417+
the :term:`thread state <attached thread state>` nor cause any calls back into our type's code;
418418

419419
* when decrementing a reference count in a :c:member:`~PyTypeObject.tp_dealloc`
420420
handler on a type which doesn't support cyclic garbage collection [#]_.

0 commit comments

Comments
 (0)