Use the WaitGroup Wisely in Concurrent Programs in Go

Jerry An
Level Up Coding
Published in
2 min readMay 1, 2022

--

Photo by Marco López on Unsplash

WaitGroup is a synchronization primitive that lets your program know when a set of goroutines have been completed.

In this post, we will explore when and how to use it to synchronize the execution of goroutines.

Start From An Example

--

--