en

Mark Murphy

Quotes

b4777467766has quoted2 years ago
Similarly, coroutines are cooperative with respect to cancellation. It is entirely possible to create a coroutine that is oblivious to a cancellation request, but that is not a particularly good idea.
b4777467766has quoted2 years ago
yield() does two things:

Since it is a suspend function, it signals to the coroutines system that it is safe to switch to another coroutine from this dispatcher, if there is one around that is ready to run
It throws CancellationException if the job was canceled
b4777467766has quoted2 years ago
Another option for code with access to a CoroutineScope is to check the isActive property
fb2epub
Drag & drop your files (not more than 5 at once)