Semaphored Wait Group
2020-04-29
One of the first things you might like to try when starting your journey with Go are the concurrency patterns. You will probably start using goroutines to run things “in the background”, and you will also get to know channels that allow for safe communication between the sub-processes.
When you’ll want to spawn many goroutines, you will surely get to know WaitGroups to wait for them to finish. There will also be the defer statement which helps you to not forget to clean up after a function has finished running (and remember, deferred calls are executed in reverse order).…