Files
chatlog_alpha/pkg/filecopy
lx1056758714-glitch 1cbad609fa Add per-file locking to prevent concurrent copy races
Introduced a sync.Map of mutexes in FileCopyManager to serialize concurrent file copy operations for the same file cache key. Updated GetTempCopy to use double-checked locking, ensuring only one goroutine creates or updates a cached file at a time. Improved atomicCopyFile to handle destination file existence gracefully, avoiding errors when concurrent processes create the same file.
2025-12-21 10:02:03 +08:00
..