-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c04/c04_04 #40
Comments
只读,只写信道的demo,用的不是同一个双向信道吗?只是定义了不同的变量名字而已啊,那有什么意义呢,本质上用的还是双向信道 |
二者类型不一样。你可以试下效果 |
这里应该是阻塞吧? |
当容量为0时,说明信道中不能存放数据,在发送数据时,必须要求立马有人接收,否则会报错。此时的信道称之为无缓冲信道。 |
测试了一下,channel为0,也是可以发送的,接收不到,就一直block,直到有数据进入了channel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
4.4 学习 Go 协程:详解信道/通道 — Go编程时光 1.0.0 documentation
https://golang.iswbm.com/c04/c04_04.html
The text was updated successfully, but these errors were encountered: