mirror of https://github.com/python/cpython
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:
parent
b5e7ff4aeb
commit
867f2d45cd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue