Update examples/waitgroup/waitgroup.go
Co-Authored-By: Mark McGranaghan <mmcgrana@gmail.com>
This commit is contained in:
parent
705f713db2
commit
2967315795
@ -29,7 +29,7 @@ func main() {
|
|||||||
// goroutines launched here to finish.
|
// goroutines launched here to finish.
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
|
||||||
// Launch several goroutines and increment the WorkGroup
|
// Launch several goroutines and increment the WaitGroup
|
||||||
// counter for each.
|
// counter for each.
|
||||||
for i := 1; i <= 5; i++ {
|
for i := 1; i <= 5; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user