关于chansend函数
来源:1-9 神奇的内置数据结构
Garry_27
2021-05-29 13:46:03
func chansend(c *hchan, ep unsafe.Pointer, block bool, callerpc uintptr) bool
chansend这个函数中的block参数什么情况下为false和true。源码中只看到了在select中会是false。
1回答
Xargin
2021-05-29
只有在
select {
case <- ch:
default:
}
才会是 false
相似问题