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 fdirosa
Recipients Rhamphoryncus, fdirosa, nnorwitz, timbishop, vslavik
Date 2008-07-08.22:04:59
SpamBayes Score 5.2340496e-05
Marked as misclassified No
Message-id <1215554701.47.0.574165824719.issue1758146@psf.upfronthosting.co.za>
In-reply-to
Content
I believe PyThreadState_Swap function in ceval.c has a bug as I stated 
earlier.  However, I have not seen it included in the latest patches so 
now I wonder...

The following line in PyThreadState_Swap...
if (check && check->interp == newts->interp && check != newts)

should read as follows...
if (check && check->interp != newts->interp && check != newts)

since this condition, if true, raises an error.  Why should it raise an 
error if all the interpreters are equal across multiple thread states?  
If we have one interpreter with multiple thread states (i.e. multi-
threaded application) this function will error when switching between 
the thread states within the same interpreter (in DEBUG compile mode 
only since this code is commented out otherwise).  In the forums it 
describes the use of thread states to handle multiple python threads 
running simultaneously and not by using multiple interpreters but only 
one (the main interpreter).

Also the interpreters have be equal because in the documentation for 
the GIL functions it says it doesn't support multiple interpreters.  I 
think this is a typo/bug in the code.
History
Date User Action Args
2008-07-08 22:05:02fdirosasetspambayes_score: 5.23405e-05 -> 5.2340496e-05
recipients: + fdirosa, nnorwitz, Rhamphoryncus, timbishop, vslavik
2008-07-08 22:05:01fdirosasetspambayes_score: 5.23405e-05 -> 5.23405e-05
messageid: <1215554701.47.0.574165824719.issue1758146@psf.upfronthosting.co.za>
2008-07-08 22:05:00fdirosalinkissue1758146 messages
2008-07-08 22:04:59fdirosacreate