Go's sync
package provides some primitives for synchronizing concurrency, including WaitGroup. This example shows how we use WaitGroup to synchronize across multiple concurrent goroutines.
Use WaitGroup to block execution of goroutine, including main.
-
Run the program
$ make run