Add a cross process build lock and use it in the archetype content builder

Fixes #9048
This commit is contained in:
Bjørn Erik Pedersen
2021-10-17 11:54:55 +02:00
parent c7957c90e8
commit ba35e69856
7 changed files with 79 additions and 32 deletions

View File

@@ -70,9 +70,6 @@ type HugoSites struct {
// If this is running in the dev server.
running bool
// Serializes rebuilds when server is running.
runningMu sync.Mutex
// Render output formats for all sites.
renderFormats output.Formats
@@ -682,6 +679,9 @@ type BuildCfg struct {
// Can be set to build only with a sub set of the content source.
ContentInclusionFilter *glob.FilenameFilter
// Set when the buildlock is already acquired (e.g. the archetype content builder).
NoBuildLock bool
testCounters *testCounters
}