Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
realjf committed Jun 24, 2023
1 parent fe02963 commit c877236
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c877236

Please sign in to comment.