Skip to content

Commit 4c5e2cd

Browse files
committed
Update comment in Thread#{wakeup,run}
1 parent dbe4b43 commit 4c5e2cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/truffleruby/core/thread/ThreadNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ protected DynamicObject wakeup(DynamicObject rubyThread) {
454454
throw new RaiseException(getContext(), coreExceptions().threadErrorKilledThread(this));
455455
}
456456

457+
// This only interrupts Kernel#sleep, Mutex#sleep and ConditionVariable#wait by having those check for the
458+
// wakeup flag. Other operations just retry when interrupted.
457459
Layouts.THREAD.getWakeUp(rubyThread).set(true);
458-
459-
// TODO: should only interrupt sleep
460460
getContext().getThreadManager().interrupt(thread);
461461

462462
return rubyThread;

0 commit comments

Comments
 (0)