2 ms·
What does an async block evaluate to? Does that wrap up the contents in Kotlin's equivalent of a Future? In any case, I'm a big fan of the idea that async/awai
by eridius 7y ago
What does an async block evaluate to? Does that wrap up the contents in Kotlin's equivalent of a Future?
In any case, I'm a big fan of the idea that async/await is just syntax around something that can be done without the syntax (i.e. wrapping Futures that can otherwise be manipulated without the syntax).
- Rusky 7y agoYes, an async block (or `suspend` closure in Kotlin) just wraps up its contents in a future, applying the same state machine transform as would be applied to a top-level async function.