We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b10658 commit 1afcbb7Copy full SHA for 1afcbb7
Doc/c-api/init.rst
@@ -1339,8 +1339,8 @@ with sub-interpreters:
1339
1340
Return ``1`` if the current thread is holding the GIL and ``0`` otherwise.
1341
This function can be called from any thread at any time.
1342
- Only if it has had its Python thread state initialized and currently is
1343
- holding the GIL will it return ``1``.
+ Only if it has had its Python thread state initialized via :c:func:`PyGILState_Ensure`
+ and currently is holding the GIL will it return ``1``.
1344
This is mainly a helper/diagnostic function. It can be useful
1345
for example in callback contexts or memory allocation functions when
1346
knowing that the GIL is locked can allow the caller to perform sensitive
0 commit comments