🍜slightly revise

This commit is contained in:
Andy Pan 2019-07-27 12:02:21 +08:00
parent 94763266ad
commit 61c6b5a7b0
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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