Hey everyone! I'm trying to wrap my head around ho...
# coroutines
m
Hey everyone! I'm trying to wrap my head around how coroutines work, and especially how I can use await/async. I hope someone can help me out with the following: If we look at the async/await example. Let's say for fun, we resume immediately in our await function. Would the call to await in this case be synchronous or would we still be suspended while machine.resume(value) is called?
Copy code
suspend fun <V> await(future: CompletableFuture<V>, machine: Continuation<V>) {
        machine.resume(someCachedValue)
    }
I can clarify my reasoning behind wanting to do this, if it doesn't make sense ­čÖé Let me know