mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 21:52:31 +03:00
A tiny bug
This commit is contained in:
parent
e4cf586e99
commit
daa37af856
@ -239,7 +239,7 @@ func learnConcurrency() {
|
||||
go inc(0, c) // go is a statement that starts a new goroutine.
|
||||
go inc(10, c)
|
||||
go inc(-805, c)
|
||||
// 从channel中独处结果并打印。
|
||||
// 从channel中读取结果并打印。
|
||||
// 打印出什么东西是不可预知的。
|
||||
fmt.Println(<-c, <-c, <-c) // channel在右边的时候,<-是读操作。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user