On Wed, Aug 24, 2016 at 2:49 AM, Chintan Sheth wrote:
> I am using select statement to dispatch work coming from multiple
> goroutines, the variables used to consume the channel are allocated manually
> as I am recycling those
>
>
> for {
> a := getA()
> b := getB()
> select {
> case a = <-cha
I am using select statement to dispatch work coming from multiple
goroutines, the variables used to consume the channel are allocated
manually as I am recycling those
for {
a := getA()
b := getB()
select {
case a = <-chan1:
go doSomething(&a)
case b = <-chan2:
go doSomething2(&b)
}
}