mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-27 19:41:11 +01:00
refactor(concurrency): simplify some waitgroup usage, remove extra wg.Done in wg.Go left in 11af9d1 in io.go
This commit is contained in:
@@ -23,9 +23,7 @@ import (
|
||||
func parallel(fns ...func()) {
|
||||
var wg sync.WaitGroup
|
||||
for _, fn := range fns {
|
||||
wg.Go(func() {
|
||||
fn()
|
||||
})
|
||||
wg.Go(fn)
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user