Franco DiRosa <[EMAIL PROTECTED]> added the comment:

The documentation states that thread states are supported within a 
single interpreter and not supported across other interpreters 
(specifically for the GIL functions which are just wrapper functions 
around the  PyEval_ functions).

So I would have to conclude then that the condition should check to see 
if the swapping thread is within the current interpreter state 
otherwise "fatal error", as such...

The condition: check->interp == newts->interp

should be: check->interp != newts->interp

In otherwords if there is a previous thread state and it's interpreter 
is NOT the same as the one being swapped in then do the fatal error.

Just my opinion.  I ran into this problem when using the 
PyThreadState_Swap function directly (low level) to do the thread 
handling within a single interpreter state (Debug mode only).

----------
nosy: +fdirosa

_______________________________________
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

Reply via email to