From 867f2d45cd9906a323c7eff7cf5d43c128038ad6 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Thu, 16 Jun 2005 11:35:00 +0000 Subject: [PATCH] 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 :). --- Python/pystate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/pystate.c b/Python/pystate.c index abca8ddfdff..e2cf7c564d5 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -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