https://kotlinlang.org logo
#coroutines
Title
# coroutines
l

louiscad

02/11/2018, 10:33 AM
New question: Does
withContext
handles cancellation before and after running its lambda?
j

Jonathan

02/13/2018, 4:56 PM
doc states:
By default, the coroutine is immediately scheduled for execution and can be cancelled while it is waiting to be executed and it can be cancelled while the result is scheduled to be processed by the invoker context
my understanding is the correct answer to your question is "before and after"
l

louiscad

02/13/2018, 6:15 PM
Thanks @Jonathan, this confirms my intuition. Was it in
withContext
doc (which I would have shamefully overlooked), or somewhere else (in this case, could you link it?)?
2 Views