You can have more than one thread state for a thread if they

correspond to different interpreters (I hope, please revert if this is
wrong :).
This commit is contained in:
Michael W. Hudson 2005-06-16 11:35:00 +00:00
parent b5e7ff4aeb
commit 867f2d45cd
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ PyThreadState_Swap(PyThreadState *new)
#if defined(Py_DEBUG) && defined(WITH_THREAD)
if (new) {
PyThreadState *check = PyGILState_GetThisThreadState();
if (check && check != new)
if (check && check->interp == new->interp && check != new)
Py_FatalError("Invalid thread state for this thread");
}
#endif