Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 604 Bytes

README.md

File metadata and controls

24 lines (13 loc) · 604 Bytes

The select statement

The select statement lets a goroutine wait on multiple communication operations.

A select blocks until one of its cases can run, then it executes that case. It chooses one at random if multiple are ready.

There is a default case as well.

The default case in a select is run if no other case is ready.

Code Review

Spec

If one or more of the communications can proceed, a single one that can proceed is chosen via a uniform pseudo-random selection.