mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
fixing race condition in CreatePages
This commit is contained in:
parent
c5ae2a2d1d
commit
0282c922b4
1 changed files with 2 additions and 7 deletions
|
@ -343,8 +343,8 @@ func (s *Site) CreatePages() error {
|
|||
|
||||
wg := &sync.WaitGroup{}
|
||||
|
||||
wg.Add(procs * 4)
|
||||
for i := 0; i < procs*4; i++ {
|
||||
wg.Add(1)
|
||||
go sourceReader(s, filechan, results, wg)
|
||||
}
|
||||
|
||||
|
@ -372,14 +372,9 @@ func (s *Site) CreatePages() error {
|
|||
|
||||
wg = &sync.WaitGroup{}
|
||||
|
||||
wg.Add(2 * procs * 4)
|
||||
for i := 0; i < procs*4; i++ {
|
||||
wg.Add(1)
|
||||
go fileConverter(s, fileConvChan, results, wg)
|
||||
}
|
||||
|
||||
wg = &sync.WaitGroup{}
|
||||
for i := 0; i < procs*4; i++ {
|
||||
wg.Add(1)
|
||||
go pageConverter(s, pageChan, results, wg)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue