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

@@ -15,9 +15,7 @@ func TestRefCounterAddSub(t *testing.T) {
rc.Add()
for range 2 {
wg.Go(func() {
rc.Sub()
})
wg.Go(rc.Sub)
}
wg.Wait()