🦁 Fix the bug in function "Submit()"

This commit is contained in:
Andy Pan 2019-01-26 13:16:35 +08:00
parent e15105fd84
commit 096e6f1513
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ func NewTimingPool(size, expiry int) (*Pool, error) {
// Submit submits a task to this pool. // Submit submits a task to this pool.
func (p *Pool) Submit(task f) error { func (p *Pool) Submit(task f) error {
if p.release == nil { if p.release != nil {
return ErrPoolClosed return ErrPoolClosed
} }
p.getWorker().task <- task p.getWorker().task <- task