This commit is contained in:
hexxa 2021-09-11 20:06:01 +08:00 committed by Hexxa
parent e47ee4aa8c
commit 8518072c7e
8 changed files with 134 additions and 30 deletions

View file

@ -88,7 +88,12 @@ func (wp *WorkerPool) Start() {
}
func (wp *WorkerPool) Stop() {
defer close(wp.queue)
wp.on = false
for wp.started > 0 {
wp.deps.Log().Errorf(fmt.Sprintf("%d workers still in working", wp.started))
time.Sleep(time.Duration(1) * time.Second)
}
}
func (wp *WorkerPool) startWorker() {