From 61c6b5a7b0a8c1035c654f230f6bc69ae7a3452c Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sat, 27 Jul 2019 12:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=9Cslightly=20revise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker.go | 2 +- worker_func.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worker.go b/worker.go index 332f772..5904e39 100644 --- a/worker.go +++ b/worker.go @@ -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 diff --git a/worker_func.go b/worker_func.go index b13fde1..76e96a3 100644 --- a/worker_func.go +++ b/worker_func.go @@ -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