KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Go has a mechanism to do a blocking read from one of several channels, the select statement. So you can say select { case <- c1: case <- c2: } will block until we get input from either of these two channels. Very nice. But this requires that I specify in the source code how many channels I want to poll. What if I have a slice or array of channels and I want to block until I get input on any of them?
Tags (comma-separated)
Save Edits
Cancel