Luis Munoz
08/18/2020, 10:15 PMvar scope = CoroutineScope(<http://Dispatchers.IO|Dispatchers.IO> + CoroutineName("myLoop"))
job = scope.launch {
while (this.isActive) {
(0 until appCfg.count).map {
delay(delayBetweenDeviceStarts)
val sn = appCfg.startSn + it
launch{
// DO SOME HTTP OPERATIONS
}
}.joinAll()
}
}
TwoClocks
08/19/2020, 1:52 AMLuis Munoz
08/19/2020, 2:59 AMlaunch{
try {
// DO SOME HTTP OPERATIONS
} catch(ex: Exception) {
}
Good point about the IOException, I probably should be catching Throwable not Exception just to make sureTwoClocks
08/19/2020, 3:56 AMLukas Lechner
08/19/2020, 12:51 PMnetworking library
that you use to post your requests? It’s probably using a ThreadPool
under the hood and at some point it might exhaust the thread pool?