elaborate tissue
11/07/2019, 2:28 PMrunBlocking {
launch (Dispatchers.Unconfined) {
// check every x seconds if file exists, if it does then kill app (and all other coroutines)
}
launch (<http://Dispatchers.IO|Dispatchers.IO>) {
// every x seconds send metrics to server
}
for (i in 1..Runtime.getRuntime().availableProcessors()) {
launch (Dispatchers.Default) {
// use remaining cpu/mem resources to process batch items
}
}
}
running this means that when all available processors are doing work, the jobs which are supposed to run every x seconds never run, how am I supposed to get them to run regularly regardless of if available processors are performing the batch work?withoutclass
11/07/2019, 5:00 PMyield
or other suspension points that way it give a chance for other coroutines to run