never getting canceled, even if `launch`'s CoroutineScope ends?
z
Zach Klippenstein (he/him) [MOD]
09/17/2020, 5:29 PM
If the launch's scope or job is cancelled, consumeEach should be cancelled as well.
d
David W
09/17/2020, 5:35 PM
Oh really? That's perfect, then
David W
09/17/2020, 5:36 PM
I was thinking that since
consumeEach
stays suspended, it wouldn't be canceled
b
bdawg.io
09/17/2020, 6:14 PM
suspend
generally means that function becomes part of the caller's scope/structured concurrency (in this case, the
launch
's scope)
🙏 1
z
Zach Klippenstein (he/him) [MOD]
09/17/2020, 6:23 PM
Cancellation primarily means suspended coroutines are cancelled. Running code can’t actually be cancelled unless it cooperatively checks for cancellation.