diff options
author | Shenghou Ma <minux@golang.org> | 2015-03-15 18:21:08 -0400 |
---|---|---|
committer | Minux Ma <minux@golang.org> | 2015-03-16 21:43:31 +0000 |
commit | 10a98dd6d912783fbd9226615d16b526f2c9dd6c (patch) | |
tree | 0457559f6c8f3da11fc6e9777ac1d652e2b8c092 /doc/go_mem.html | |
parent | e2ca3e6c0fddeca2135cd35e2a7c9de917054cbe (diff) | |
download | go-10a98dd6d912783fbd9226615d16b526f2c9dd6c.tar.gz go-10a98dd6d912783fbd9226615d16b526f2c9dd6c.zip |
doc/go_mem.html: correct the channel example
While we're here, also fix two HTML issues.
Fixes #9235.
Change-Id: I6e2f50931c0f387881271484a726ac2308518cf4
Reviewed-on: https://go-review.googlesource.com/7602
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'doc/go_mem.html')
-rw-r--r-- | doc/go_mem.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/go_mem.html b/doc/go_mem.html index 5dd48ff7fb..143f3b2ff2 100644 --- a/doc/go_mem.html +++ b/doc/go_mem.html @@ -322,11 +322,11 @@ var limit = make(chan int, 3) func main() { for _, w := range work { - go func() { - limit <- 1 + go func(w func()) { + limit <- 1 w() - <-limit - }() + <-limit + }(w) } select{} } |