mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
hugolib: Cleanup the Goroutine count calculation
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user