forked from mirror/ants
add expired time for pool
This commit is contained in:
parent
d04febc0b2
commit
56943d78d5
2
ants.go
2
ants.go
|
@ -37,7 +37,7 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Init a instance pool when importing ants
|
// Init a instance pool when importing ants
|
||||||
var defaultPool, _ = NewPool(DefaultPoolSize)
|
var defaultPool, _ = NewPool(DefaultPoolSize, 10)
|
||||||
|
|
||||||
// Submit submit a task to pool
|
// Submit submit a task to pool
|
||||||
func Submit(task f) error {
|
func Submit(task f) error {
|
||||||
|
|
Loading…
Reference in New Issue