notice that you will have all 100 coroutines runni...
# coroutines
c
notice that you will have all 100 coroutines running in parallel, just not concurrently
g
@Paul Woitaschek Yes, so this example scales not so good. Solution with channel is better:
Copy code
val channel = produce {
        (0..100).forEach {
            send(it)
        }
    }
    (1..3).map {
        async {
            channel.consumeEach {
                println(it)
            }
        }
    }.map {
        it.await()
    }