3 ms·
A single-item-buffered chan is probably most common, but a sync.WaitGroup w/ a 1 add can work if you don't need to do other ops while waiting.
by kodablah 8y ago
A single-item-buffered chan is probably most common, but a sync.WaitGroup w/ a 1 add can work if you don't need to do other ops while waiting.