From 7f82498abcec1ec09cce5634f6cbf4fcc3fff81c Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sat, 4 Aug 2018 10:49:07 +0800 Subject: [PATCH] update default settings of pool --- ants.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ants.go b/ants.go index 3cbd5b6..8844460 100644 --- a/ants.go +++ b/ants.go @@ -35,18 +35,8 @@ const ( DefaultCleanIntervalTime = 10 ) -var ( - defaultAntsPool *Pool - err error -) - // Init a instance pool when importing ants -func init() { - defaultAntsPool, err = NewPool(DefaultAntsPoolSize) - if err != nil { - panic(err) - } -} +var defaultAntsPool, _ = NewPool(DefaultAntsPoolSize) // Submit submit a task to pool func Submit(task f) error {