elizarov
05/04/2017, 6:44 AMsuspend fun
are are direct analogue of Quasar’s @Suspendable
(or throws SuspendExecution
) functions and suspension can happen at any depth in the stack as long as the whole call chain is marked with suspend
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.