mirror of https://github.com/panjf2000/ants.git
25 lines
324 B
Go
25 lines
324 B
Go
package ants
|
|
|
|
import "math"
|
|
|
|
const DEFAULT_POOL_SIZE = math.MaxInt32
|
|
|
|
var defaultPool = NewPool(DEFAULT_POOL_SIZE)
|
|
|
|
func Push(task f) error {
|
|
return defaultPool.Push(task)
|
|
}
|
|
|
|
func Running() int {
|
|
return defaultPool.Running()
|
|
}
|
|
|
|
func Cap() int {
|
|
return defaultPool.Cap()
|
|
}
|
|
|
|
func Free() int {
|
|
return defaultPool.Free()
|
|
}
|
|
|