Bradleycorn
09/02/2022, 1:57 PMLifecycle.whenResumed
vs Lifecyle.withResumed
? .. it seems like they both work the same way?Robert Williams
09/02/2022, 2:23 PMUmar Ata
09/02/2022, 2:25 PMBradleycorn
09/02/2022, 2:28 PMAdam Powell
09/02/2022, 3:41 PMwith*
methods accept blocks that cannot suspend, so the case the SO answer describes about resuming from suspension not guaranteeing lifecycle state can't happenAdam Powell
09/02/2022, 3:43 PMwhen*
methods are a source of bugs that we should have deprecated a long time ago. Since they use a pausing dispatcher that doesn't run continuations outside of lifecycle and instead defers them, that means that things like exception handling, notably CancellationExceptions, are also deferred until you're back in lifecycle again or the lifecycle is destroyedAdam Powell
09/02/2022, 3:45 PMAdam Powell
09/02/2022, 3:45 PMwith*
methods explicitly replace them with safer alternatives, alongside repeatOnLifecycle
Colton Idle
09/05/2022, 8:11 PM