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

Class AsyncPromise

future-java/src/main/java/io/trane/future/FuturePool.java:80–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80final class AsyncPromise<T> extends Promise<T> implements Runnable {
81 private final Supplier<T> s;
82
83 public AsyncPromise(final Supplier<T> s) {
84 super();
85 this.s = s;
86 }
87
88 @Override
89 public final void run() {
90 try {
91 setValue(s.get());
92 } catch (final Throwable error) {
93 NonFatalException.verify(error);
94 setException(error);
95 }
96 }
97}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…