mirror of https://github.com/kami-blue/client
Formatting in BackgroundScope
This commit is contained in:
parent
49b915828a
commit
72938e730d
|
@ -20,12 +20,13 @@ internal object BackgroundScope : CoroutineScope by CoroutineScope(newFixedThrea
|
|||
return launchLooping(BackgroundJob(name, delay, block))
|
||||
}
|
||||
|
||||
fun launchLooping(job: BackgroundJob) : BackgroundJob {
|
||||
fun launchLooping(job: BackgroundJob): BackgroundJob {
|
||||
if (!started) {
|
||||
jobs[job] = null
|
||||
} else {
|
||||
jobs[job] = startJob(job)
|
||||
}
|
||||
|
||||
return job
|
||||
}
|
||||
|
||||
|
@ -44,4 +45,4 @@ internal object BackgroundScope : CoroutineScope by CoroutineScope(newFixedThrea
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue