Update examples/waitgroup/waitgroup.go
Co-Authored-By: Mark McGranaghan <mmcgrana@gmail.com>
This commit is contained in:
parent
c7dd69349b
commit
074571d952
@ -36,7 +36,7 @@ func main() {
|
|||||||
go worker(i, &wg)
|
go worker(i, &wg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block until the WorkGroup counter goes back to 0;
|
// Block until the WaitGroup counter goes back to 0;
|
||||||
// all the workers notified they're done.
|
// all the workers notified they're done.
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user