more lock releasing

This commit is contained in:
Radu Ioan Fericean
2014-01-09 22:16:49 +02:00
parent 7ee915e916
commit 0278f08de4

View File

@@ -42,6 +42,7 @@ func (s *Scheduler) Loop() {
for {
s.Lock()
for len(s.queue) == 0 { //hang here if empty
s.Unlock()
<-s.restartLoop
}
a0 := s.queue[0]