1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-11 09:14:39 +02:00

Merge pull request #1233 from muxuezi/patch-2

A tiny bug
This commit is contained in:
Geoff Liu
2015-09-14 12:44:32 -06:00

View File

@@ -239,7 +239,7 @@ func learnConcurrency() {
go inc(0, c) // go is a statement that starts a new goroutine. go inc(0, c) // go is a statement that starts a new goroutine.
go inc(10, c) go inc(10, c)
go inc(-805, c) go inc(-805, c)
// 从channel中独处结果并打印。 // 从channel中读取结果并打印。
// 打印出什么东西是不可预知的。 // 打印出什么东西是不可预知的。
fmt.Println(<-c, <-c, <-c) // channel在右边的时候<-是读操作。 fmt.Println(<-c, <-c, <-c) // channel在右边的时候<-是读操作。