Re: [go-nuts] create channels on the fly en-masse

2016-12-12 Thread Ian Lance Taylor
On Mon, Dec 12, 2016 at 2:04 PM, Itay Donanhirsh wrote: > > Is there any penalty for creating channels "on-the-fly" in golang? No, creating a channel just a memory allocation. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] create channels on the fly en-masse

2016-12-12 Thread Itay Donanhirsh
Hi There, Is there any penalty for creating channels "on-the-fly" in golang? Such a use case: asynchronous processing of data, where every invocation is unrelated to the other. I would imagine something like: ``` ch := make(chan int) func request(i int) chan-> int { reply := make(chan int)