HFish/core/pool/pool.go
2019-09-08 23:14:24 +08:00

13 lines
187 B
Go

package pool
import (
"sync"
"github.com/panjf2000/ants"
)
func New(size int) (sync.WaitGroup, *ants.Pool) {
wg := sync.WaitGroup{}
pool, _ := ants.NewPool(size)
return wg, pool
}