refactor(concurrency): simplify some waitgroup usage, remove extra wg.Done in wg.Go left in 11af9d1 in io.go

This commit is contained in:
yusing
2025-08-17 00:23:54 +08:00
parent b32750d545
commit 0862920324
5 changed files with 4 additions and 13 deletions

View File

@@ -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()
}