From c8772366fc6c9c4501bcbc903272fcffb8a3a9c7 Mon Sep 17 00:00:00 2001 From: realjf Date: Sat, 24 Jun 2023 09:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pool.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pool.go b/pool.go index 6781a75..43848a9 100644 --- a/pool.go +++ b/pool.go @@ -345,26 +345,6 @@ func (p *pool) Run() { runtime.Gosched() } - ticker := time.NewTicker(time.Second * 3) - go func() { - for { - select { - case <-ticker.C: - if p.debug { - p.lock.RLock() - log.Info(color.InGreen("job done: " + strconv.Itoa(p.doneNum))) - p.lock.RUnlock() - } - log.Info(color.InBlue("total goroutines: " + strconv.Itoa(p.GetGoroutineNum()))) - log.Info(color.InGreen("idle goroutines: " + strconv.Itoa(p.GetIdleWorkerNum()))) - log.Info(color.InRed("busy goroutines: " + strconv.Itoa(p.GetBusyWorkerNum()))) - log.Info(color.InRed("job queue length: " + strconv.Itoa(len(p.JobQueue)))) - case <-p.ctx.Done(): - return - } - } - - }() stop: for { select {