Update comment - needs to be RW lock to be effective
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b6e03db1ea
commit
21220b692f
@ -36,7 +36,7 @@ func moveBuildArtifacts() bool {
|
|||||||
|
|
||||||
newROMs = true
|
newROMs = true
|
||||||
log.Printf("new build found - moving file %s", v.Name())
|
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()))
|
err := copyThenDeleteFile(fmt.Sprintf("%s/%s", buildOutDirectory, v.Name()), fmt.Sprintf("%s/%s", romDirectory, v.Name()))
|
||||||
romCache.Unlock()
|
romCache.Unlock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user