ctierney
02/01/2019, 7:35 PMfun Application.launchSyncJob(sessionizeUrl: String, sessionizeInterval: Long) {
<http://log.info|log.info>("Synchronizing each $sessionizeInterval minutes with $sessionizeUrl")
GlobalScope.launch {
while (true) {
...
I was wondering why it uses GlobalScope
instead of the Application
CoroutineScope
? Is there a reason to prefer one or the other for this sort of thing? (Assume the background job should run for as long as the Application is up.)