Eugen Martynov
09/24/2026, 1:33 PMdelay in try/catch so it doesn't crash if job was cancelled while waiting?Dmitry Khalanskiy [JB]
09/24/2026, 1:36 PMCancellationException if you happened to catch it.Eugen Martynov
09/24/2026, 1:37 PMEugen Martynov
09/24/2026, 1:37 PMEugen Martynov
09/24/2026, 1:38 PMtryEmit on channel and delay in view model scopeEugen Martynov
09/24/2026, 1:39 PMDmitry Khalanskiy [JB]
09/24/2026, 1:39 PMcoroutineScope {
val job = launch {
delay(100.seconds)
}
job.cancel()
}
will not throw an exception. Coroutines don't treat cancellation exceptions as problems.
Something more complex than just delay throwing because of a cancellation must be going on.Eugen Martynov
09/24/2026, 1:40 PMDmitry Khalanskiy [JB]
09/24/2026, 1:41 PMstreetsofboston
09/24/2026, 1:51 PMstreetsofboston
09/24/2026, 1:52 PMEugen Martynov
09/24/2026, 2:17 PMEugen Martynov
09/24/2026, 2:17 PMreformator
09/24/2026, 2:34 PMSince stacktrace is not helpfulTaking this opportunity, I'd recommend Decoroutinator for full traces.
Eugen Martynov
09/24/2026, 2:34 PMEugen Martynov
09/24/2026, 2:34 PM