3 ms·
See http://golang.org/doc/go_spec.html#Select_statements http://golang.org/doc/go_spec.html#Select_statements for the relevant documentation. What select does
by btilly 16y ago
See http://golang.org/doc/go_spec.html#Select_statements http://golang.org/doc/go_spec.html#Select_statements for the relevant documentation. What select does is selects which communication option to do, and it blocks until one of the options is available. So if you select on one option, you will block until you do that. But default is always available, so now you don't block.