mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
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>
This commit is contained in:
parent
e2ca3e6c0f
commit
10a98dd6d9
|
@ -322,11 +322,11 @@ var limit = make(chan int, 3)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
for _, w := range work {
|
for _, w := range work {
|
||||||
go func() {
|
go func(w func()) {
|
||||||
limit <- 1
|
limit <- 1
|
||||||
w()
|
w()
|
||||||
<-limit
|
<-limit
|
||||||
}()
|
}(w)
|
||||||
}
|
}
|
||||||
select{}
|
select{}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue