https://kotlinlang.org logo
Title
d

Darren Gu

04/03/2020, 3:31 AM
If I need to use an application scope, can I use GlobalScope? Or I need to create my own scope?
z

zhuinden

04/03/2020, 2:19 PM
yes, you can use
GlobalScope
inside app-scoped components or
object
(singletons) for operations that don't require cancellation
e

Erik

04/03/2020, 2:22 PM
Agreed. It's arguable what operations would neither require cancellation nor handling of completion (either successful or exceptional). It's somewhat similar to the discussions around the singleton pattern and (in)valid uses for it.
d

Darren Gu

04/03/2020, 3:02 PM
thanks folks