Is there some practical use for the new `suspend` ...
# coroutines
d
Is there some practical use for the new
suspend
function in stdlib in 1.2.30? The release notes have an example that's not too clear to me what the point is...?
Copy code
suspend {     val result = deferredResult.await()     renderResult() }.startCoroutine(completion)
also check related issues
In general it’s just a way to create a lambda where you can call some other suspend functions but invoke only from other suspend context
d
To compose suspend functions into a lambda that's not suspend? Why not just declare a suspend function and call them there? But then, I guess I'll take a look at those issues, thanks! Sometimes they're not so easy to find...
g
because a function is not a lambda %)
Of course you can
Different semantics