1
0
Fork 0

Now we can safely stop waiting for tasks when shutdown is closed

This commit is contained in:
Gregory Eremin 2015-10-18 03:34:10 +03:00
parent d847be21c6
commit ef17093207
1 changed files with 2 additions and 6 deletions

View File

@ -117,12 +117,8 @@ func (s *Satan) runWorker(i int) {
select { select {
case t := <-s.queue: case t := <-s.queue:
s.processTask(t) s.processTask(t)
default: case <-s.shutdownWorkers:
select { return
case <-s.shutdownWorkers:
return
default:
}
} }
} }
} }