@@ -21,8 +21,8 @@ import (
2121 "strings"
2222 "time"
2323
24+ "github.com/bep/helpers/maphelpers"
2425 "github.com/gohugoio/go-radix"
25- "github.com/gohugoio/hugo/common/hmaps"
2626 "github.com/gohugoio/hugo/common/paths"
2727 "github.com/gohugoio/hugo/common/types"
2828 "github.com/gohugoio/hugo/hugofs/files"
@@ -54,9 +54,9 @@ type allPagesAssembler struct {
5454 rwRoot * doctree.NodeShiftTreeWalker [contentNode ] // walks resources.
5555
5656 // Walking state.
57- seenTerms * hmaps. Map [term , sitesmatrix.Vectors ]
58- droppedPages * hmaps. Map [* Site , []string ] // e.g. drafts, expired, future.
59- seenRootSections * hmaps. Map [string , bool ]
57+ seenTerms * maphelpers. ConcurrentMap [term , sitesmatrix.Vectors ]
58+ droppedPages * maphelpers. ConcurrentMap [* Site , []string ] // e.g. drafts, expired, future.
59+ seenRootSections * maphelpers. ConcurrentMap [string , bool ]
6060 seenHome bool // set before we fan out to multiple goroutines.
6161}
6262
@@ -75,16 +75,16 @@ func newAllPagesAssembler(
7575 pw := rw .Extend ()
7676 pw .Tree = m .treePages
7777
78- seenRootSections := hmaps . NewMap [string , bool ]()
78+ seenRootSections := maphelpers . NewConcurrentMap [string , bool ]()
7979 seenRootSections .Set ("" , true ) // home.
8080
8181 return & allPagesAssembler {
8282 ctx : ctx ,
8383 h : h ,
8484 m : m ,
8585 assembleChanges : assembleChanges ,
86- seenTerms : hmaps . NewMap [term , sitesmatrix.Vectors ](),
87- droppedPages : hmaps . NewMap [* Site , []string ](),
86+ seenTerms : maphelpers . NewConcurrentMap [term , sitesmatrix.Vectors ](),
87+ droppedPages : maphelpers . NewConcurrentMap [* Site , []string ](),
8888 seenRootSections : seenRootSections ,
8989 assembleSectionsInParallel : ! h .isRebuild (), // On partial rebuilds, there's potential data races with parallel section assembly.
9090 pwRoot : pw ,
0 commit comments