From 24c28c985c65e9c187a6342f4096e137d2d7d90f Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Fri, 25 Jan 2019 22:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=8E=20Reduce=20blank=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker.go | 3 ++- worker_func.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/worker.go b/worker.go index 4875266..eb8f9cc 100644 --- a/worker.go +++ b/worker.go @@ -54,6 +54,7 @@ func (w *Worker) run() { } } }() + for f := range w.task { if f == nil { w.pool.decRunning() @@ -63,4 +64,4 @@ func (w *Worker) run() { w.pool.putWorker(w) } }() -} +} \ No newline at end of file diff --git a/worker_func.go b/worker_func.go index 24b2bd3..47ece34 100644 --- a/worker_func.go +++ b/worker_func.go @@ -54,6 +54,7 @@ func (w *WorkerWithFunc) run() { } } }() + for args := range w.args { if args == nil { w.pool.decRunning() @@ -63,4 +64,4 @@ func (w *WorkerWithFunc) run() { w.pool.putWorker(w) } }() -} +} \ No newline at end of file