mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 09:51:02 +00:00
🍜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…
x
Reference in New Issue
Block a user