ansman
08/31/2020, 3:50 PMJob
is cancelled but still having it be cancelled if the parent job is cancelled. Here is a short snippet showcasing the issue:
val job = launch {
delay(400.milliseconds)
showView()
try {
// Ideally I would like this part to mean job.cancel() has no effect
// but if the parent job is cancelled it should cancel immediatly
withContext(NonCancellable) {
delay(400.milliseconds)
}
} finally {
hideView()
}
}