4 ms·
Nobody really uses the non-blocking channel receive operations. I didn't even know it existed until now. Selecting on multiple channels is, however, is used ve
by marketer 16y ago
Nobody really uses the non-blocking channel receive operations. I didn't even know it existed until now.
Selecting on multiple channels is, however, is used very often, so this fits that paradigm quite well.
- justinlilly 16y agoWhat does it actually do? Executes the body of the case for the channel which has output?
- teejae 16y agoYes, that's right, and only once. It's like a switch statement, only using inputs instead of fixed cases. It does make sense to have the blocking version, if there's nothing else to do.
- jlouis 16y agoThere is also a fairness point: If more than one channel is available, which one to go is selected in a fair way. This is important so a channel at the top can not flood and monopolize the selective communication primitive.