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
|
return
|
||||||
} else {
|
} else {
|
||||||
b.buildWG.Add(1)
|
b.buildWG.Add(1)
|
||||||
|
b.parseWG.Done()
|
||||||
}
|
}
|
||||||
|
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
@@ -387,7 +388,6 @@ func (b *BuildManager) parseWorker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.build[pkg.March] <- pkg
|
b.build[pkg.March] <- pkg
|
||||||
b.parseWG.Done()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -741,7 +741,6 @@ func (b *BuildManager) syncWorker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.parseWG.Wait()
|
b.parseWG.Wait()
|
||||||
time.Sleep(time.Second * 70)
|
|
||||||
b.buildWG.Wait()
|
b.buildWG.Wait()
|
||||||
|
|
||||||
if !b.exit {
|
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