MCPcopy Create free account
hub / github.com/traneio/future / join

Method join

future-java/src/main/java/io/trane/future/Promise.java:438–448  ·  view source on GitHub ↗
(final Duration timeout)

Source from the content-addressed store, hash-verified

436 }
437
438 @Override
439 public final void join(final Duration timeout) throws CheckedFutureException {
440 final ReleaseOnRunLatch latch = new ReleaseOnRunLatch();
441 ensure(latch);
442 try {
443 if (!latch.tryAcquireSharedNanos(1, timeout.toNanos()))
444 throw new TimeoutException();
445 } catch (final InterruptedException ex) {
446 throw new CheckedFutureException(ex);
447 }
448 }
449
450 private static class Map<T, R> extends Continuation<T, R> {
451 private final Function<? super T, ? extends R> f;

Callers 1

getMethod · 0.95

Calls 1

ensureMethod · 0.95

Tested by

no test coverage detected