Using Channel, I can write: `val upstream: Receiv...
# coroutines
c
Using Channel, I can write:
Copy code
val upstream: ReceiveChannel<Int>
val downstream = produce<String> {
  for (u in upstream)
    u.toString()
}
This is essentially the
map
operation on a channel. Is there a way to run it in parallel (eg. Having multiple coroutines that read from the channel, process the data and send the results)? I can write an easy for-i loop, but it won't close the original channel.