Merge pull request #696 from liunaijia/patch-2

Change the 'value' parameter description
This commit is contained in:
astaxie
2016-08-19 22:02:58 +08:00
committed by GitHub

View File

@@ -93,8 +93,7 @@ channel通过操作符`<-`来接收和发送数据
ch := make(chan type, value)
value == 0 ! 无缓冲阻塞
value > 0 ! 缓冲非阻塞直到value 个元素)
value = 0 channel 是无缓冲阻塞读写的当value > 0 时channel 有缓冲、是非阻塞的,直到写满 value 个元素才阻塞写入。
我们看一下下面这个例子你可以在自己本机测试一下修改相应的value值