Change the 'value' parameter description

I'd like to think the description of 'value' parameter isn't the part of the code. I was confused by it when it's written in the code block, then I realized it's the explanation of the parameter.
This commit is contained in:
Naijia Liu
2016-08-19 13:57:17 +08:00
committed by GitHub
parent 75691e69f0
commit 571a57b635

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值