For those using Coroutines... Do you have your own...
# android
r
For those using Coroutines... Do you have your own custom "global scope". If so, do you cancel it? I'm creating a global scope (includes our thread pool)... But I wonder if I need to cancel it or it's children due to some lifecycle. Only one would be application lifecycle but not sure if it marrers. Thoughts?
s
If setting up your own I think it makes sense to tie it to the Application lifecycle
for cleanliness
z
I production, your app lifecycle is pretty much your process lifecycle, so it might not seem like it matters. However, we have found it useful to be able to explicitly control the app lifecycle when running UI/instrumentation tests. So we have an app scope that we cancel and recreate after every UI test to ensure we're not accidentally leaking state/resources between them.