Skip to content

Commit 7221408

Browse files
[GR-67785] Fix detach_all_threads_and_tear_down_isolate.
PullRequest: graal/21534
2 parents 80fea3c + 51dfe87 commit 7221408

File tree

1 file changed

+2
-2
lines changed
  • substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread

1 file changed

+2
-2
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/VMThreads.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,11 @@ private static class DetachAllExternallyStartedThreadsExceptCurrentOperation ext
688688

689689
@Override
690690
protected void operate() {
691-
IsolateThread currentThread = CurrentIsolate.getCurrentThread();
691+
IsolateThread operationThread = CurrentIsolate.getCurrentThread();
692692
IsolateThread thread = firstThread();
693693
while (thread.isNonNull()) {
694694
IsolateThread next = nextThread(thread);
695-
if (thread.notEqual(currentThread) && !wasStartedByCurrentIsolate(thread)) {
695+
if (thread.notEqual(queuingThread) && thread.notEqual(operationThread) && !wasStartedByCurrentIsolate(thread)) {
696696
/*
697697
* The code below is similar to VMThreads.detachCurrentThread() except that it
698698
* doesn't call VMThreads.threadExit(). We assume that this is tolerable

0 commit comments

Comments
 (0)