// Shutdown waits all worker to finish
Shutdown waits all worker to finish
// Shutdown waits all worker to finish
func (w *worker) Shutdown() {
	w.stopOnce.Do(func() {
		close(w.done)
		w.wg.Wait()
	})
}
func ( w * worker ) Shutdown ( ) { w . stopOnce . Do ( func ( ) { close ( w . done ) w . wg . Wait ( ) } ) }
Shutdown waits all worker to finish
Shutdown waits all worker to finish