Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed9dcc1

Browse files
committed
Clarify that the Python interpreter lock need *not* be held by
PyInterpreterState_New() and PyThreadState_New() -- but that you may use it to serialize calls to them.
1 parent cdf6af1 commit ed9dcc1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/api/api.tex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,8 +2914,9 @@ \section{Thread State and the Global Interpreter Lock}
29142914
interpreter lock has been created.
29152915
29162916
\begin{cfuncdesc}{PyInterpreterState*}{PyInterpreterState_New}{}
2917-
Create a new interpreter state object. The interpreter lock must be
2918-
held.
2917+
Create a new interpreter state object. The interpreter lock need not
2918+
be held, but may be held if it is necessary to serialize calls to this
2919+
function.
29192920
\end{cfuncdesc}
29202921
29212922
\begin{cfuncdesc}{void}{PyInterpreterState_Clear}{PyInterpreterState *interp}
@@ -2931,7 +2932,8 @@ \section{Thread State and the Global Interpreter Lock}
29312932
29322933
\begin{cfuncdesc}{PyThreadState*}{PyThreadState_New}{PyInterpreterState *interp}
29332934
Create a new thread state object belonging to the given interpreter
2934-
object. The interpreter lock must be held.
2935+
object. The interpreter lock need not be held, but may be held if it
2936+
is necessary to serialize calls to this function.
29352937
\end{cfuncdesc}
29362938
29372939
\begin{cfuncdesc}{void}{PyThreadState_Clear}{PyThreadState *tstate}

0 commit comments

Comments
 (0)