Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Aug 4, 2018
2 parents 6c322c6 + 7f82498 commit 2fa305b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2fa305b

Please sign in to comment.