MCPcopy Create free account
hub / github.com/esoco/coroutines / ScopeCode

Interface ScopeCode

src/main/java/de/esoco/coroutine/CoroutineScope.java:461–475  ·  view source on GitHub ↗

A functional interface that will be executed in a scope that has been launched with CoroutineScope#launch(ScopeCode). It is typically used in the form of a lambda expression or method reference. @author eso

Source from the content-addressed store, hash-verified

459 * @author eso
460 */
461 @FunctionalInterface
462 public interface ScopeCode {
463
464 /**
465 * Starts coroutines in the given {@link CoroutineScope} by invoking
466 * methods like {@link Coroutine#runAsync(CoroutineScope, Object)} on it
467 * and optionally also performs other operations, like processing the
468 * results.
469 *
470 * @param rScope The scope to run in
471 * @throws Exception Executions may throw arbitrary exceptions which
472 * will be handled by the scope
473 */
474 void runIn(CoroutineScope rScope) throws Exception;
475 }
476
477 /**
478 * An implementation of the future interface that wraps a scope execution.

Callers 2

launchMethod · 0.80
ScopeFutureMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected