How to use coroutines instead of parallelstreams in kotlin
I am failry new to Kotlin and I want to know about a scenario where I have some list of IDs (say customer-ids) that needs to be processed and should be tracked. I have used java parallel-streams for iterating the list and processing them parallely. I just want to know how to do the same using kotlin coroutines with async and await. Is there any benefit to it compared to parallel streams?
Any help welcomed. Thanks in advance!
fun process(id: String) = runBlocking {
//holds logic to call an...