Update comment - needs to be RW lock to be effective
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steven Polley 2023-06-30 19:59:12 -06:00
parent b6e03db1ea
commit 21220b692f

View File

@ -36,7 +36,7 @@ func moveBuildArtifacts() bool {
newROMs = true
log.Printf("new build found - moving file %s", v.Name())
romCache.Lock() // lock to prevent multiple concurrent goroutines moving the same file
romCache.Lock() // RW lock to prevent multiple concurrent goroutines moving the same file
err := copyThenDeleteFile(fmt.Sprintf("%s/%s", buildOutDirectory, v.Name()), fmt.Sprintf("%s/%s", romDirectory, v.Name()))
romCache.Unlock()
if err != nil {