Can I call Deferred<>.await() many times?
11:25 24 May 2020

I am a newbie about coroutines and I have a simple question. Can I call await() many times to get the result value? E.g.

class Test: CoroutineScope {
    val my_value = async { "Hello World!" }

    suspend fun f1() {
        println(my_value.await())
    }

    suspend fun f2() {
        println(my_value.await())
    }
}

I suppose second call to await() will immediately return the computed value. Is that right?

kotlin kotlin-coroutines