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

Method ensure

future-java/src/main/java/io/trane/future/Promise.java:624–635  ·  view source on GitHub ↗
(final Runnable f)

Source from the content-addressed store, hash-verified

622 }
623
624 @Override
625 public final Future<T> ensure(final Runnable f) {
626 if (getInterruptHandler() != null)
627 return continuation(new Ensure<T>(f) {
628 @Override
629 protected final InterruptHandler getInterruptHandler() {
630 return Promise.this;
631 }
632 });
633 else
634 return continuation(new Ensure<T>(f));
635 }
636
637 private static class OnSuccess<T> extends Continuation<T, T> {
638 private final Consumer<? super T> c;

Callers 2

joinMethod · 0.95
ensurePromiseMethod · 0.95

Calls 2

getInterruptHandlerMethod · 0.95
continuationMethod · 0.95

Tested by

no test coverage detected