forked from ALHP/ALHP.GO
move parseWG.done() after buildWG has been increased
This commit is contained in:
5
main.go
5
main.go
@@ -53,6 +53,7 @@ func (b *BuildManager) buildWorker(id int, march string) {
|
||||
return
|
||||
} else {
|
||||
b.buildWG.Add(1)
|
||||
b.parseWG.Done()
|
||||
}
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
@@ -387,7 +388,6 @@ func (b *BuildManager) parseWorker() {
|
||||
}
|
||||
|
||||
b.build[pkg.March] <- pkg
|
||||
b.parseWG.Done()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -741,7 +741,6 @@ func (b *BuildManager) syncWorker() {
|
||||
}
|
||||
|
||||
b.parseWG.Wait()
|
||||
time.Sleep(time.Second * 70)
|
||||
b.buildWG.Wait()
|
||||
|
||||
if !b.exit {
|
||||
@@ -753,7 +752,7 @@ func (b *BuildManager) syncWorker() {
|
||||
}
|
||||
}
|
||||
|
||||
time.Sleep(time.Duration(*checkInterval-1) * time.Minute)
|
||||
time.Sleep(time.Duration(*checkInterval) * time.Minute)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user