Maybe `fun suspend(block: suspend () -> Unit) =...
# coroutines
k
Maybe
fun suspend(block: suspend () -> Unit) = block
works?
r
That's actually pretty nice, thanks! But I take it there is no in-language way to do this directly, then?
Ah, you have to add a
noinline
to the parameter though, otherwise the compiler complains.
...and then it's not really inlined, so it comes with a little overhead. Still a nice solution though ­čÖé
k
I'm not sure if there is a real solution, this is only my second day knowing about coroutines.
e
That is the solution we have for now. Whether there is going to be another solution in the future is an open question.