forked from mirror/ants
optimization
This commit is contained in:
parent
bb81602342
commit
76cc065dbc
2
ants.go
2
ants.go
|
@ -35,12 +35,12 @@ const (
|
||||||
DefaultCleanIntervalTime = 10
|
DefaultCleanIntervalTime = 10
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init a instance pool when importing ants
|
|
||||||
var (
|
var (
|
||||||
defaultAntsPool *Pool
|
defaultAntsPool *Pool
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Init a instance pool when importing ants
|
||||||
func init() {
|
func init() {
|
||||||
defaultAntsPool, err = NewPool(DefaultAntsPoolSize)
|
defaultAntsPool, err = NewPool(DefaultAntsPoolSize)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue