Skip to content

Commit

Permalink
remove unnecessary channel closure
Browse files Browse the repository at this point in the history
  • Loading branch information
bimboterminator1 committed Dec 3, 2024
1 parent 6d30def commit 84624a7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion hw05_parallel_execution/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func Run(tasks []Task, n, m int) error {
wg.Wait()

if m > 0 && atomic.LoadInt64(&errCount) >= int64(m) {
once.Do(func() { close(stopChan) })
return ErrErrorsLimitExceeded
}
close(stopChan)
Expand Down

0 comments on commit 84624a7

Please sign in to comment.