Skip to content

Commit 6bc0fdc

Browse files
committed
try to tweak thread shutdown and join time and ordering
1 parent abecad7 commit 6bc0fdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,7 @@ private void joinThreads() {
17491749
// running any GraalPython code anymore
17501750
int tries = isOurThread ? 100 : 5;
17511751
for (int i = 0; i < tries && thread.isAlive(); i++) {
1752+
thread.join(tries - i);
17521753
env.submitThreadLocal(new Thread[]{thread}, new ThreadLocalAction(true, false) {
17531754
@Override
17541755
protected void perform(ThreadLocalAction.Access access) {
@@ -1758,7 +1759,6 @@ protected void perform(ThreadLocalAction.Access access) {
17581759
if (isOurThread) {
17591760
thread.interrupt();
17601761
}
1761-
thread.join(2);
17621762
}
17631763
if (isOurThread) {
17641764
// Thread#stop is not supported on SVM

0 commit comments

Comments
 (0)