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

Method raise

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

Raises an interrupt. @param ex the interrupt exception.

(final Throwable ex)

Source from the content-addressed store, hash-verified

361 * @param ex the interrupt exception.
362 */
363 @SuppressWarnings("unchecked")
364 @Override
365 public final void raise(final Throwable ex) {
366 InterruptHandler interruptHandler;
367 final Object curr = state;
368 if (curr instanceof SatisfiedFuture) // Done
369 return;
370 else if (curr instanceof Promise && !(curr instanceof Continuation)) // Linked
371 ((Promise<T>) curr).raise(ex);
372 else if (curr instanceof LinkedContinuation)
373 ((LinkedContinuation<?, T>) curr).raise(ex);
374 else if ((interruptHandler = getInterruptHandler()) != null)
375 interruptHandler.raise(ex);
376 }
377
378 @Override
379 public Future<T> interruptible() {

Callers

nothing calls this directly

Calls 3

getInterruptHandlerMethod · 0.95
raiseMethod · 0.95
raiseMethod · 0.65

Tested by

no test coverage detected