关于课后作业的问题。
junjunfly opened this issue · 1 comments
junjunfly commented
版本是go1.8.3 darwin/amd64
按照老师的写法,deadlock
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan send]:
main.main()
/Users/LuJun/go/development/src/lesson13.go:20 +0x137
goroutine 5 [chan receive (nil chan)]:
main.Pingpang()
/Users/LuJun/go/development/src/lesson13.go:11 +0x67
created by main.main
/Users/LuJun/go/development/src/lesson13.go:18 +0x6a
exit status 2
exit status 1
我也是生命的全局变量chan,然后方法里传入这个变量后,程序正常,不知道是否是go版本的问题。
unknwon commented
其实我不知道你在说什么。。