elizarov
12/26/2016, 1:17 PMasync(Cancellable()) { … }
or, if you have your own single-threaded dispatcher, for example,
async(Cancellable(myDispatcher)) { … }
The other entry points are via suspending functions, like withTimeout
, so that inside a coroutine you can write
withTimeout(myTimeout) { … }
and if the block inside the coroutine times out, it will abort this particular block, but not the outer coroutine. I think I can make them properly-nesting at any level.