Issue 1031233: Clean up discussion of new C thread idiom (original) (raw)
In init.tex, the code for the typical idiom for C threads now uses the PyGILState functions. However the preceeding discussion still refers to the need to acquire an interpreter state, etc. Attached is a patch which tries to clean this up a little. I removed the paragraph about interpreter states (which raises the possibility of creating a new interpreter state) since multiple interpreter states are, I believe, incompatible (or at least untested) with PyGILState. It's possible that more of PEP 311 should be included here, particularly the part about having to call PyEval_InitThreads on the main thread before using any of the thread APIs.