Skip to content

Commit 468edec

Browse files
committed
clear the thread local PThreadState on shutdown
1 parent 259bbb9 commit 468edec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ public void runShutdownHooks() {
694694
for (ShutdownHook h : shutdownHooks) {
695695
h.call(this);
696696
}
697+
// destroy thread state
698+
if (customThreadState != null) {
699+
customThreadState.set(null);
700+
}
697701
}
698702

699703
@TruffleBoundary

0 commit comments

Comments
 (0)