Interface CoroutineScope.ScopeCode

  • Enclosing class:
    CoroutineScope
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface CoroutineScope.ScopeCode
    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.
    • Method Detail

      • runIn

        void runIn​(CoroutineScope rScope)
            throws java.lang.Exception
        Starts coroutines in the given CoroutineScope by invoking methods like Coroutine.runAsync(CoroutineScope, Object) on it and optionally also performs other operations, like processing the results.
        Parameters:
        rScope - The scope to run in
        Throws:
        java.lang.Exception - Executions may throw arbitrary exceptions which will be handled by the scope