Re: [go-nuts] select on slice of channels

2019-09-13 Thread Ian Lance Taylor
On Fri, Sep 13, 2019 at 9:00 AM Andrey Tcherepanov wrote: > > it is nice to know that there is at least "an escape hatch" through reflect > package if needed. > > Is there an upper bound for how many items could be in that slice (select > statement)? Not really. At some point if you keep addin

Re: [go-nuts] select on slice of channels

2019-09-13 Thread Andrey Tcherepanov
Thanks Ian, it is nice to know that there is at least "an escape hatch" through reflect package if needed. Is there an upper bound for how many items could be in that slice (select statement)? Andrey On Friday, September 13, 2019 at 12:02:18 AM UTC-6, Ian Lance Taylor wrote: > > On Thu, Sep

Re: [go-nuts] select on slice of channels

2019-09-13 Thread Rob Pike
The feature was in Newsqueak but we deliberately omitted it from Go because the cost of the operation can be very high and we weren't comfortable provided such concise notation for such an expensive operation. -rob On Fri, Sep 13, 2019 at 4:02 PM Ian Lance Taylor wrote: > On Thu, Sep 12, 2019

Re: [go-nuts] select on slice of channels

2019-09-12 Thread Ian Lance Taylor
On Thu, Sep 12, 2019 at 9:40 PM Andrey Tcherepanov wrote: > > well, subj - why can't I "just" do a select on a slice of channels? Yes, I > can run a bunch goroutines with of reads on an each channel, funnel it all > into 1 notification channel, pick up on the other side... boring stuff, > rea

[go-nuts] select on slice of channels

2019-09-12 Thread Andrey Tcherepanov
Folks, well, subj - why can't I "just" do a select on a slice of channels? Yes, I can run a bunch goroutines with of reads on an each channel, funnel it all into 1 notification channel, pick up on the other side... boring stuff, really... But why not "just" func main() { cc := make(