Not sure if this would work but you could try ``` ...
# coroutines
m
Not sure if this would work but you could try
Copy code
fun <T> CoroutineScope.parallelActor(
    paralellism: Int,
    block: suspend ActorScope<T>.()->Unit
): SendChannel<T> {

    require(paralellism > 0)

    val sendChannel = Channel<T>()
    repeat(paralellism){
        launch {
            sendChannel.toChannel(actor (block = block))
        }
    }

    return sendChannel
}
👍 1