mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-18 19:31:02 +00:00
🐳 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.
|
// Invoke submits a task to pool.
|
||||||
func (p *PoolWithFunc) Serve(args interface{}) error {
|
func (p *PoolWithFunc) Invoke(args interface{}) error {
|
||||||
if 1 == atomic.LoadInt32(&p.release) {
|
if 1 == atomic.LoadInt32(&p.release) {
|
||||||
return ErrPoolClosed
|
return ErrPoolClosed
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user