by mrj · 15y ago · 0 comments
No, Andrew described this case:
> should be rewritten as,
> select {
> case ch <- v:
> // sent
> default:
> // not sent
> }
Without the default, the select statement becomes blocking.Selecting on multiple channels is, however, is used very often, so this fits that paradigm quite well.
It does make sense to have the blocking version, if there's nothing else to do.