mirror of https://github.com/panjf2000/ants.git
🐳 Switch function name from Serve to Invoke
This commit is contained in:
parent
315bac653e
commit
96348a39f5
|
@ -124,8 +124,8 @@ func NewTimingPoolWithFunc(size, expiry int, pf func(interface{})) (*PoolWithFun
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Serve submits a task to pool.
|
||||
func (p *PoolWithFunc) Serve(args interface{}) error {
|
||||
// Invoke submits a task to pool.
|
||||
func (p *PoolWithFunc) Invoke(args interface{}) error {
|
||||
if 1 == atomic.LoadInt32(&p.release) {
|
||||
return ErrPoolClosed
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue