@@ -1262,7 +1262,7 @@ with sub-interpreters:
12621262.. c:function:: PyGILState_STATE PyGILState_Ensure()
12631263
12641264 Ensure that the current thread is ready to call the Python C API regardless
1265- of the current state of Python, or of the global interpreter lock. This may
1265+ of the current state of Python, or of the :term:`current thread state`. This may
12661266 be called as many times as desired by a thread as long as each call is
12671267 matched with a call to :c:func:`PyGILState_Release`. In general, other
12681268 thread-related APIs may be used between :c:func:`PyGILState_Ensure` and
@@ -1924,16 +1924,16 @@ pointer and a void pointer argument.
19241924 both these conditions met:
19251925
19261926 * on a :term:`bytecode` boundary;
1927- * with the main thread holding the :term:`global interpreter lock `
1927+ * with the main thread holding an :term:`attached thread state `
19281928 (*func* can therefore use the full C API).
19291929
19301930 *func* must return ``0`` on success, or ``-1`` on failure with an exception
19311931 set. *func* won't be interrupted to perform another asynchronous
19321932 notification recursively, but it can still be interrupted to switch
1933- threads if the global interpreter lock is released .
1933+ threads if the :term:`thread state <attached thread state>` is detached .
19341934
19351935 This function doesn't need a current thread state to run, and it doesn't
1936- need the global interpreter lock .
1936+ need an :term:`attached thread state` .
19371937
19381938 To call this function in a subinterpreter, the caller must have an
19391939 :term:`attached thread state`. Otherwise, the function *func* can be scheduled to
0 commit comments