Skip to content

Commit

Permalink
update 14.4.md (unknwon#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Shuaimin authored and unknwon committed Sep 9, 2018
1 parent 86880b1 commit c28a3f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eBook/14.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ default: // no value ready to be received
- 如果多个可以处理,随机选择一个
- 如果没有通道操作可以处理并且写了 `default` 语句,它就会执行:`default` 永远是可运行的(这就是准备好了,可以执行)。

`select` 中使用发送操作并且有 `default`可以确保发送不被阻塞!如果没有 case,select 就会一直阻塞。
`select` 中使用发送操作并且有 `default` 可以确保发送不被阻塞!如果没有 `default`,select 就会一直阻塞。

`select` 语句实现了一种监听模式,通常用在(无限)循环中;在某种情况下,通过 `break` 语句使循环退出。

Expand Down

0 comments on commit c28a3f0

Please sign in to comment.