Commit 4631ebb4 authored by Michael W. Hudson's avatar Michael W. Hudson

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 :).
parent 6d87d667
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment