3 ms·
I think the biggest advantage is that it's a lot harder to screw up using a select statement than most equivalent API's you'd create in other languages that all
by SamReidHughes 7y ago
I think the biggest advantage is that it's a lot harder to screw up using a select statement than most equivalent API's you'd create in other languages that allow waiting on one of N channels/signals/channel/event operations, and branching based off that.
Simply because you're either constructing a bunch of callback objects or you get some number N saying the Nth parameter had an event, and your code has to match N to the specific channel correctly.