mirror of https://github.com/panjf2000/ants.git
🍜slightly revise
This commit is contained in:
parent
94763266ad
commit
61c6b5a7b0
|
@ -63,7 +63,7 @@ func (w *Worker) run() {
|
|||
}()
|
||||
|
||||
for f := range w.task {
|
||||
if nil == f {
|
||||
if f == nil {
|
||||
w.pool.decRunning()
|
||||
w.pool.workerCache.Put(w)
|
||||
return
|
||||
|
|
|
@ -63,7 +63,7 @@ func (w *WorkerWithFunc) run() {
|
|||
}()
|
||||
|
||||
for args := range w.args {
|
||||
if nil == args {
|
||||
if args == nil {
|
||||
w.pool.decRunning()
|
||||
w.pool.workerCache.Put(w)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue