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

Method become

future-java/src/main/java/io/trane/future/Promise.java:209–212  ·  view source on GitHub ↗

Becomes another future. This and result become the same: both are completed with the same result and both receive the same interrupt signals. @param result the future to become.

(final Future<T> result)

Source from the content-addressed store, hash-verified

207 * @param result the future to become.
208 */
209 public final void become(final Future<T> result) {
210 if (!becomeIfEmpty(result))
211 throw new IllegalStateException("Can't set result " + result + " for promise with state " + state);
212 }
213
214 /**
215 * Becomes another future only if this promise is undefined. This and result

Callers 15

setValueMethod · 0.95
setExceptionMethod · 0.95
becomeIfEmptyLinkedMethod · 0.80
raiseLinkedMethod · 0.80
becomeSuccessMethod · 0.80
becomeFailureMethod · 0.80
becomeAPromiseMethod · 0.80
becomeAContinuationMethod · 0.80

Calls 1

becomeIfEmptyMethod · 0.95

Tested by 15

becomeIfEmptyLinkedMethod · 0.64
raiseLinkedMethod · 0.64
becomeSuccessMethod · 0.64
becomeFailureMethod · 0.64
becomeAPromiseMethod · 0.64
becomeAContinuationMethod · 0.64
becomeLinkedChainMethod · 0.64
becomeDoubleLinkedMethod · 0.64