File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,14 +183,14 @@ created by the authors of this PEP:
183183 omit ``PyGILState_Ensure `` in fresh threads.
184184
185185In reality, :c:func: `PyGILState_Ensure ` doesn't just "acquire the GIL" in
186- modern versions. It attaches a :term: `thread state ` for the current
187- thread--*that's * what lets a thread invoke the C API. On with-GIL builds,
188- holding an :term: `attached thread state ` implies holding the GIL, so only one
189- thread can have one at a time. Free-threaded builds achieve the effect of
190- multi-core parallism while remaining backwards-compatible by simply removing
191- that limitation: threads still need a thread state (and thus need to call
192- :c:func: `PyGILState_Ensure `), but they don't need to wait on one another to
193- do so.
186+ modern versions (that being since 3.12). It attaches a :term: `thread state `
187+ for the current thread--*that's * what lets a thread invoke the C API. On
188+ with-GIL builds, holding an :term: `attached thread state ` implies holding the
189+ GIL, so only one thread can have one at a time. Free-threaded builds achieve
190+ the effect of multi-core parallism while remaining backwards-compatible by
191+ simply removing that limitation: threads still need a thread state (and thus
192+ need to call :c:func: `PyGILState_Ensure `), but they don't need to wait on one
193+ another to do so.
194194
195195Subinterpreters don't work with :c:func: `PyGILState_Ensure `
196196-----------------------------------------------------------
You can’t perform that action at this time.
0 commit comments