Fix deadlock when there are no modules

Change-Id: Ibfc1190f2b5ac3c3445d40f1b5dd0cd782e63dfd
This commit is contained in:
Colin Cross 2015-02-04 10:41:00 -08:00
parent c4b691f2fb
commit 11e3b0d000

View file

@ -977,8 +977,7 @@ func (c *Context) parallelVisitAllBottomUp(visit func(group *moduleGroup)) {
}
}
loop:
for {
for count > 0 {
select {
case doneGroup := <-doneCh:
for _, parent := range doneGroup.reverseDeps {
@ -988,9 +987,6 @@ loop:
}
}
count--
if count == 0 {
break loop
}
}
}
}