Skip to content

Commit be00a88

Browse files
committed
ThreadManager#runUntilResult can return null, update the docs
1 parent 38a72cb commit be00a88

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,14 @@ public Object apply(State state) {
564564
}
565565
}
566566

567-
/** Runs {@code action} until it returns a non-null value. The given action should throw an
568-
* {@link InterruptedException} when {@link Thread#interrupt()} is called. Otherwise, the {@link SafepointManager}
569-
* will not be able to interrupt this action. See {@link ThreadNodes.ThreadRunBlockingSystemCallNode} for blocking
570-
* native calls. If the action throws an {@link InterruptedException}, it will be retried until it returns a
571-
* non-null value.
567+
/** Runs {@code action} until it returns a value (IOW, until it does not throw {@link InterruptedException}). The
568+
* given action should throw an {@link InterruptedException} when {@link Thread#interrupt()} is called. Otherwise,
569+
* the {@link SafepointManager} will not be able to interrupt this action. See
570+
* {@link ThreadNodes.ThreadRunBlockingSystemCallNode} for blocking native calls. If the action throws an
571+
* {@link InterruptedException}, it will be retried until it returns a non-null value.
572572
*
573573
* @param action must not touch any Ruby state
574-
* @return the first non-null return value from {@code action} */
574+
* @return the return value from {@code action} */
575575
@TruffleBoundary
576576
public <T> T runUntilResult(Node currentNode, BlockingAction<T> action) {
577577
return runUntilResult(currentNode, action, null, null);

0 commit comments

Comments
 (0)