Add note to waitgroups example about errgroup

Fixes #308
This commit is contained in:
Eli Bendersky
2021-08-30 09:18:16 -07:00
parent df8a378a22
commit 69efd4b8c0
3 changed files with 25 additions and 5 deletions

View File

@@ -39,4 +39,9 @@ func main() {
// Block until the WaitGroup counter goes back to 0;
// all the workers notified they're done.
wg.Wait()
// Note that this approach has no straightforward way
// to propagate errors from workers. For more
// advanced use cases, consider using the
// [errgroup package](https://pkg.go.dev/golang.org/x/sync/errgroup).
}

View File

@@ -1,2 +1,2 @@
fd77f5122e6df1669c0a2e0d2c4dfbd30631c21f
7mWXl0yVe6I
b87ababcf7e1ce54107252c658840097bb6060a7
vXBl8zQpDYj