This commit is contained in:
Andy Pan 2018-07-15 20:51:14 +08:00
parent 23c80e1158
commit cc81c9573f
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ func TestAntsPoolWithFunc(t *testing.T) {
for i := 0; i < n; i++ { for i := 0; i < n; i++ {
wg.Add(1) wg.Add(1)
p.Serve(n) p.Serve(Param)
} }
wg.Wait() wg.Wait()
@ -98,7 +98,7 @@ func TestCodeCov(t *testing.T) {
p, _ := ants.NewPoolWithFunc(AntsSize, demoPoolFunc) p, _ := ants.NewPoolWithFunc(AntsSize, demoPoolFunc)
defer p.Release() defer p.Release()
for i := 0; i < n; i++ { for i := 0; i < n; i++ {
p.Serve(n) p.Serve(Param)
} }
t.Logf("pool with func, capacity:%d", p.Cap()) t.Logf("pool with func, capacity:%d", p.Cap())
t.Logf("pool with func, running workers number:%d", p.Running()) t.Logf("pool with func, running workers number:%d", p.Running())