https://kotlinlang.org logo
#coroutines
Title
# coroutines
f

fstn

12/01/2017, 10:29 AM
I miss something about Coroutine, it return Unit instead of my MutableList and I got this inside my logs:
Copy code
java.lang.IllegalStateException: Job StandaloneCoroutine{Completed}@6daf38a4 is already complete, but is being completed with kotlin.Unit]]`
When calling:
Copy code
suspend fun getValidNextEvent(node: Node, messageBody: MessageBody): MutableList<Event<MessageBody>> {

        return suspendCoroutineOrReturn { cont ->
            val eventsToEmit = mutableListOf<Event<MessageBody>>()
....
            cont.resume(eventsToEmit);
        }

    }
e

elizarov

12/01/2017, 10:43 AM
Сan you reproduce the problem with some reasonably-size self-contained code?
f

fstn

12/01/2017, 1:36 PM
no I restarted Intellij its ok now 😉
4 Views