mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-24 18:11:19 +01:00
refactor(concurrency): replaced manual WaitGroup management with new wg.Go() and removed redundant code.
This commit is contained in:
@@ -130,10 +130,9 @@ func TestFinishMultipleCalls(t *testing.T) {
|
||||
n := 20
|
||||
wg.Add(n)
|
||||
for range n {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
task.Finish(nil)
|
||||
}()
|
||||
})
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user