Franco DiRosa <[EMAIL PROTECTED]> added the comment: 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. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1758146> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com