KDOC 647: select は複数の case が同時に実行できる状態だとランダムに選ぶ
この文書のステータス
- 作成
- 2026-10-05 貴島
- レビュー
- 2026-10-05 貴島
概要
select は複数の case が同時に実行できる状態だとランダムに選ぶ。
If one or more of the communications can proceed, a single one that can proceed is chosen via a uniform pseudo-random selection. Otherwise, if there is a default case, that case is chosen. If there is no default case, the “select” statement blocks until at least one of the communications can proceed. The Go Programming Language Specification - The Go Programming Language
関連
なし。