Depends on what you wanted to do, you won't be able to cancel/join jobs if you donot store their reference. Might create problem at the time of exiting the program as you don't know which jobs are finished and which are running. However you can make your own scope with a Job and dispatchers etc which seems better.
Animesh Sahu
11/20/2020, 10:02 AM
Can you show any example of such usage? Have any problem to make functions suspend instead?
r
Raid Xu
11/20/2020, 10:07 AM
@Animesh Sahu Thanks for the reply. A singleton will live until the application dies, so it makes no difference to use
GlobalScope
here?
a
Animesh Sahu
11/20/2020, 10:09 AM
I meant, you can't assure the jobs have been finished. If main exits, your application exits (you can't