Krishna Chinya
02/08/2023, 6:52 AMwithContext(dispatchers.network.limitedParallelism(5)) {
async { //build queuedrequest list }
queuedRequests.awaitAll()
// then I process the request.
}
Android Service calls the above code snippet
scope = CoroutineScope(<http://dispatchers.io|dispatchers.io> + SupervisorJob())
// Then
scope.launch {
// calling the above code in repository
}.launchIn(scope)
cross posting from #coroutines for wider visibility