hugolib: Cleanup the Goroutine count calculation

This commit is contained in:
Bjørn Erik Pedersen
2017-02-21 18:56:56 +01:00
parent 91968f3b1f
commit 13972d6c83
3 changed files with 10 additions and 10 deletions

View File

@@ -484,8 +484,9 @@ func (h *HugoSites) setupTranslations() {
func (s *Site) preparePagesForRender(cfg *BuildCfg) {
pageChan := make(chan *Page)
wg := &sync.WaitGroup{}
numWorkers := getGoMaxProcs() * 4
for i := 0; i < getGoMaxProcs()*4; i++ {
for i := 0; i < numWorkers; i++ {
wg.Add(1)
go func(pages <-chan *Page, wg *sync.WaitGroup) {
defer wg.Done()