Revisit waitgroup (#241)
* Fix Add to waitgroup out of goroutines calling wg.Done() * Pass waitgroup to other loop functions
This commit is contained in:
@@ -89,7 +89,6 @@ func (l *looper) Start() { l.start <- struct{}{} }
|
||||
func (l *looper) Stop() { l.stop <- struct{}{} }
|
||||
|
||||
func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup) {
|
||||
wg.Add(1)
|
||||
defer wg.Done()
|
||||
waitForStart := true
|
||||
for waitForStart {
|
||||
|
||||
Reference in New Issue
Block a user