-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always call wg.Add(1) before starting goroutine
While it felt prettier to do both wg.Add(1) and wg.Done() inside the goroutine functions this is inherently causing a race between starting the goroutine and the later call to wg.Wait(). While things seems to have worked fine this way lets do it correctly everywhere to not lead by poor example for future work.
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters