05/04/2017, 6:44 AM
The short answer is that coroutines in Kotlin are stackful in the same sense as in Quasar. Kotlin
suspend fun
are are direct analogue of Quasar’s
throws SuspendExecution
) functions and suspension can happen at any depth in the stack as long as the whole call chain is marked with
which is enforced by compiler (you cannot invoke suspending function from a regular one). Quasar enforces that too, but it is using
throws SuspendExecution
and Java checked exceptions logic for this purpose, which is a little bit weaker form of enforcement.