mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-18 03:01:01 +00:00
🦁 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…
x
Reference in New Issue
Block a user