From: Benjamin Peterson Date: Fri, 10 Oct 2008 22:23:41 +0000 (+0000) Subject: PyGILState_Acquire -> PyGILState_Ensure X-Git-Tag: v2.7a1~2745 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d1e2cdad67e534407e3cdb4e511d2525c1b829d;p=thirdparty%2FPython%2Fcpython.git PyGILState_Acquire -> PyGILState_Ensure --- diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index dd2c5314f2ce..17fb82eb273e 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -755,11 +755,11 @@ created. :cmacro:`Py_END_ALLOW_THREADS` macros is acceptable. The return value is an opaque "handle" to the thread state when - :cfunc:`PyGILState_Acquire` was called, and must be passed to + :cfunc:`PyGILState_Ensure` was called, and must be passed to :cfunc:`PyGILState_Release` to ensure Python is left in the same state. Even though recursive calls are allowed, these handles *cannot* be shared - each - unique call to :cfunc:`PyGILState_Ensure` must save the handle for its call to - :cfunc:`PyGILState_Release`. + unique call to :cfunc:`PyGILState_Ensure` must save the handle for its call + to :cfunc:`PyGILState_Release`. When the function returns, the current thread will hold the GIL. Failure is a fatal error.