func (g *parallelStopper) Stop() {
	wg := &sync.WaitGroup{}
	for _, component := range g.components {
		wg.Add(1)
		go func(s Stoppable) {
			s.Stop()
			wg.Done()
		}(component)
	}
	wg.Wait()
}
// Stop stops all components in parallel and returns when they are all stopped
Stop stops all components in parallel and returns when they are all stopped
// Stop stops all components in parallel and returns when they are all stopped
func (g *parallelStopper) Stop() {
	wg := &sync.WaitGroup{}
	for _, component := range g.components {
		wg.Add(1)
		go func(s Stoppable) {
			s.Stop()
			wg.Done()
		}(component)
	}
	wg.Wait()
}
func ( g * parallelStopper ) Stop ( ) { wg := & sync . WaitGroup { } for _ , component := range g . components { wg . Add ( 1 ) go func ( s Stoppable ) { s . Stop ( ) wg . Done ( ) } ( component ) } wg . Wait ( ) }
Stop stops all components in parallel and returns when they are all stopped
Stop stops all components in parallel and returns when they are all stopped