<@U8VFLPDEX> I was thinking about cancelling the j...
# coroutines
l
@luciofm I was thinking about cancelling the job when the lifecycle state is no longer valid, e.g. cancel
onResume()
coroutine when
onPause()
is called.
🧵 1
l
You would also need to check inside the coroutines for
isActive
l
@luciofm No need if the suspending methods already handle cancellation
@elizarov @luciofm The main use case I'm thinking of right now is getting Preferences off the UI thread since first load hits storage blocking, and when it's done, continue creating the UI, taking into account the values from the Preferences. I'd do the same if I needed to use some SDK who's first access blocks the calling thread