Like sync.Mutex, but works across processes
MIT License
Bot releases are visible (Hide)
Calling Close() on windows no longer fails if UnlockFileEx returns an error since the file still gets closed and locks released no matter what
Published by alexflint over 2 years ago
Calling Close() no longer fails on windows when the file lock was never opened (thanks @lujinda!)
Published by alexflint over 4 years ago
Added FileMutex.TryLock()
, which immediately returns ErrAlreadyLocked
if the mutex is already locked (by this process or another process). This is different from FileMutex.Lock()
, which blocks until the mutex can be acquired.
Published by alexflint about 5 years ago
go-filemutex has been stable for several years. This release adds go.mod and go.sum files, bringing this package into alignment with the go module system.