This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Clean up discussion of new C thread idiom
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, glchapman
Priority: normal Keywords: patch

Created on 2004-09-20 14:14 by glchapman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
init.tex.diff glchapman, 2004-09-23 12:13
Messages (3)
msg46919 - (view) Author: Greg Chapman (glchapman) Date: 2004-09-20 14:14
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.
msg46920 - (view) Author: Greg Chapman (glchapman) Date: 2004-09-23 12:13
Logged In: YES 
user_id=86307

Changed my added text to refer to Py_NewInterpreter, rather
than PyInterpreterState_New.
msg46921 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2005-01-19 04:19
Logged In: YES 
user_id=3066

Committed as Doc/api/init.tex revisions 1.22 and 1.21.2.1.
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40934
2004-09-20 14:14:19glchapmancreate