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
| 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. |
no outgoing calls
no test coverage detected