From 21220b692fe72aee282bf4578f49194a98b5a5a1 Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Fri, 30 Jun 2023 19:59:12 -0600 Subject: [PATCH] Update comment - needs to be RW lock to be effective --- processFiles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processFiles.go b/processFiles.go index 7be5f7c..8bc9fd6 100644 --- a/processFiles.go +++ b/processFiles.go @@ -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 {