我在此链接中看到了一些代码,并感到困惑:http : //www.darkcoding.net/software/go-lang-after-four-months/第二个值(确定)是什么意思?for self.isRunning { select { case serverData, ok = <-fromServer: // What's the meaning of the second value(ok)? if ok { self.onServer(serverData) } else { self.isRunning = false } case userInput, ok = <-fromUser: if ok { self.onUser(userInput) } else { self.isRunning = false } }}
- 3 回答
- 0 关注
- 228 浏览
添加回答
举报
0/150
提交
取消