🐳 Switch function name from Serve to Invoke

This commit is contained in:
Andy Pan 2019-02-19 20:16:14 +08:00
parent 315bac653e
commit 96348a39f5
1 changed files with 2 additions and 2 deletions

View File

@ -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
} }