Can I call Deferred<>.await() many times?
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?