报错代码展示:
func testDeadLock(c chan int){
for{
fmt.Println(<-c)
}
}
func main() {
c :=make(chan int)
c<-'A'
go testDeadLock(c)
time.Sleep(time.Millisecond)
}
channel无缓冲时,是阻塞的
https://blog.youkuaiyun.com/u011328417/article/details/89473323