Browse Source

En cours de développement

master
losyme 7 months ago
parent
commit
1047e40801
  1. 16
      workers/supervisor.go

16
workers/supervisor.go

@ -40,14 +40,16 @@ func (s *supervisor) loop() {
defer close(s.eventCh)
for {
if size := s.pool.size(); size != s.poolSize {
if size < s.poolSize {
s.pool.startOneWorker(s.eventCh)
} else {
s.pool.stopOneWorker()
}
if !end {
if size := s.pool.size(); size != s.poolSize {
if size < s.poolSize {
s.pool.startOneWorker(s.eventCh)
} else {
s.pool.stopOneWorker()
}
continue
continue
}
}
e := <-s.eventCh

Loading…
Cancel
Save