Rename waitgroup-->waitgroups
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// across goroutines. Here's an example of using a
|
||||
// blocking receive to wait for a goroutine to finish.
|
||||
// When waiting for multiple goroutines to finish,
|
||||
// you may prefer to use a [WaitGroup](waiting-for-goroutines-to-finish).
|
||||
// you may prefer to use a [WaitGroup](waitgroups).
|
||||
|
||||
package main
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
df90432a53832c045472981a9da23d1139fb2b5c
|
||||
f6qTtt1agmN
|
||||
eb022977181884c2ab0f2b69e50311769e67a509
|
||||
8lmP8beav0p
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
ffc6520e73ebfa2b8c470e3ef00fee55388234e0
|
||||
8cD2V9CgI0J
|
||||
2
examples/waitgroups/waitgroups.hash
Normal file
2
examples/waitgroups/waitgroups.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
499c7ee59b2ae06d2d3171768d9cf11762121a87
|
||||
gLLmgcR7YkP
|
||||
@@ -1,4 +1,4 @@
|
||||
$ go run waitgroup.go
|
||||
$ go run waitgroups.go
|
||||
Worker 5 starting
|
||||
Worker 3 starting
|
||||
Worker 4 starting
|
||||
@@ -44,7 +44,7 @@ func main() {
|
||||
// Finally we collect all the results of the work.
|
||||
// This also ensures that the worker goroutines have
|
||||
// finished. An alternative way to wait for multiple
|
||||
// goroutines is to use a [WaitGroup](waitgroup).
|
||||
// goroutines is to use a [WaitGroup](waitgroups).
|
||||
for a := 1; a <= 5; a++ {
|
||||
<-results
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
3f7712d470dcbfc0cdddc939bb80814baaff8bb0
|
||||
Q5r-XtrWWL-
|
||||
bc69c6602d438413dcb9ceac112299ee253e4575
|
||||
yuHsGf712D1
|
||||
|
||||
Reference in New Issue
Block a user