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.

Author ncoghlan
Recipients
Date 2004-10-10.15:47:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1038590

The patch doesn't apply cleanly to current CVS (no actual
conflict that I can see - just the patch machinery getting
confused by a cautionary comment added to the top of pystate.c)

Inspecting the patch manually, it looks like it does the
right thing, given that Python instructs that Py_Initialise
and PyEval_InitThreads *both* be called prior while the
application is still single-threaded.

However, _PyThread_Started seems like an odd bit of code -
prior to this patch, it is set (initialised to 0 in
pythonrun.c, set to 1 by PyEval_InitThreads), but never
referenced anywhere (despite the comment saying that it is a
"Flag for Py_Exit").

It's also not part of any API (even an internal one). It is
defined in pythonrun.c, then declared as extern in ceval.c.
The patch adds another extern declaration in pystate.c

It would seem better (and only slightly more work) to add a
real API (such as adding PyThread_IsInitialized() to
pythread.h), rather than entrenching further use of
_PyThread_Started.
History
Date User Action Args
2007-08-23 14:25:27adminlinkissue1011380 messages
2007-08-23 14:25:27admincreate