@@ -474,6 +474,7 @@ public static CancellationScope newDetachedCancellationScope(Runnable runnable)
474474 *
475475 * @return feature that becomes ready when at least specified number of seconds passes. promise is
476476 * failed with {@link CanceledFailure} if enclosing scope is canceled.
477+ * @see #sleep(Duration) for a blocking version
477478 */
478479 public static Promise <Void > newTimer (Duration delay ) {
479480 return WorkflowInternal .newTimer (delay );
@@ -485,6 +486,7 @@ public static Promise<Void> newTimer(Duration delay) {
485486 *
486487 * @return feature that becomes ready when at least specified number of seconds passes. promise is
487488 * failed with {@link CanceledFailure} if enclosing scope is canceled.
489+ * @see #sleep(Duration) for a blocking version
488490 */
489491 public static Promise <Void > newTimer (Duration delay , TimerOptions options ) {
490492 return WorkflowInternal .newTimer (delay , options );
@@ -566,12 +568,20 @@ public static long currentTimeMillis() {
566568 return WorkflowInternal .currentTimeMillis ();
567569 }
568570
569- /** Must be called instead of {@link Thread#sleep(long)} to guarantee determinism. */
571+ /**
572+ * Must be called instead of {@link Thread#sleep(long)} to guarantee determinism.
573+ *
574+ * @see #newTimer(Duration) for a non-blocking version that returns a Promise
575+ */
570576 public static void sleep (Duration duration ) {
571577 WorkflowInternal .sleep (duration );
572578 }
573579
574- /** Must be called instead of {@link Thread#sleep(long)} to guarantee determinism. */
580+ /**
581+ * Must be called instead of {@link Thread#sleep(long)} to guarantee determinism.
582+ *
583+ * @see #newTimer(Duration) for a non-blocking version that returns a Promise
584+ */
575585 public static void sleep (long millis ) {
576586 WorkflowInternal .sleep (Duration .ofMillis (millis ));
577587 }
@@ -585,6 +595,7 @@ public static void sleep(long millis) {
585595 * contain any time based conditions. Use {@link #await(Duration, Supplier)} for those
586596 * instead.
587597 * @throws CanceledFailure if thread (or current {@link CancellationScope} was canceled).
598+ * @see Async#await(java.util.function.Supplier) for a non-blocking version that returns a Promise
588599 */
589600 public static void await (Supplier <Boolean > unblockCondition ) {
590601 WorkflowInternal .await (
@@ -606,6 +617,8 @@ public static void await(Supplier<Boolean> unblockCondition) {
606617 * Use timeout parameter for those.
607618 * @return false if timed out.
608619 * @throws CanceledFailure if thread (or current {@link CancellationScope} was canceled).
620+ * @see Async#await(Duration, java.util.function.Supplier) for a non-blocking version that returns
621+ * a Promise
609622 */
610623 public static boolean await (Duration timeout , Supplier <Boolean > unblockCondition ) {
611624 return WorkflowInternal .await (
0 commit comments