forked from mirror/ants
🦁 Fix the bug in function "Submit()"
This commit is contained in:
parent
e15105fd84
commit
096e6f1513
2
pool.go
2
pool.go
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue