A Barrier in the synchronization world allows threads to wait for other threads to reach a certain point. A counting semaphore allows n numbers of threads to access a shared resource.
So from this, a sync.WaitGroup
is a cross between a Barrier & a counting Semaphore (but without any concept of shared resource). Is this an accurate mental model ?