Skip to content

Commit 4239645

Browse files
committed
Test retrieving PyThreadState multiple times from different thread
1 parent ff325b2 commit 4239645

File tree

1 file changed

+3
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+3
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_thread.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def test_register_new_thread(self):
9999
if (!PyObject_CallNoArgs(callable)) {
100100
PyErr_WriteUnraisable(callable);
101101
}
102+
if (PyThreadState_Get() == NULL || PyThreadState_Get() == NULL) {
103+
PyErr_WriteUnraisable(callable);
104+
}
102105
PyGILState_Release(gstate);
103106
return NULL;
104107
}

0 commit comments

Comments
 (0)