I'm sure this is a known problem, and my question ...
# coroutines
o
I'm sure this is a known problem, and my question has probably been asked before... I have a variable
f: suspend () -> Unit
. How can I call this from within a suspending function in an easy way? When I try to do
f()
I get an error saying something like
f does not have an invoke() function
. I guess this makes sense if you're not already in a suspending function, i.e you do not have a
Continuation<Unit>
handy. But calling
f
from inside a suspending function should not be a problem, right?