mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
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…
x
Reference in New Issue
Block a user