杰伦窗外的小麻雀
2016-05-11 14:43
我填的0,为什么send出不来? func main() { var myChannel = make(chan int, (0)) var number = 6 go func() { var sender Sender = myChannel sender <- number fmt.Println("Sent!") }() go func() { var receiver Receiver = myChannel fmt.Println("Received!", <-receiver) }() time.Sleep(time.Second) }
哈哈。搞定了就好
已经解决,不必解答了哦
Go语言第一课
107752 学习 · 148 问题
相似问题