From: Ezio Melotti Date: Thu, 5 May 2011 11:21:18 +0000 (+0300) Subject: #11997: merge with 3.1. X-Git-Tag: v3.2.1b1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f77b74dd1beacb69b6853303aa70a0de64cd71ae;p=python #11997: merge with 3.1. --- f77b74dd1beacb69b6853303aa70a0de64cd71ae diff --cc Doc/c-api/init.rst index e50c417d36,b2fa3ee6e1..1806867e5e --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@@ -882,11 -866,11 +882,11 @@@ instances or classes between sub-interp by such objects may affect the wrong (sub-)interpreter's dictionary of loaded modules. -Also note that combining this functionality with :cfunc:`PyGILState_\*` APIs +Also note that combining this functionality with :c:func:`PyGILState_\*` APIs - is delicate, become these APIs assume a bijection between Python thread states + is delicate, because these APIs assume a bijection between Python thread states and OS-level threads, an assumption broken by the presence of sub-interpreters. It is highly recommended that you don't switch sub-interpreters between a pair -of matching :cfunc:`PyGILState_Ensure` and :cfunc:`PyGILState_Release` calls. +of matching :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:`ctypes`) using these APIs to allow calling of Python code from non-Python created threads will probably be broken when using sub-interpreters.