When `download` finishes its work the dispatcher p...
# coroutines
i
When
download
finishes its work the dispatcher posts the continuation (the rest of block after
await
) to UI thread. Then after UI thread picks that continuation and it starts executing, the continuation checks whether it was cancelled. Since it happens on UI thread it may be cancelled at that moment or not, but its state doesn't change until it finishes its execution on UI thread, given that
onPause
can only be called from UI thread.