go-filemutex

Like sync.Mutex, but works across processes

MIT License

Stars
70

Bot releases are hidden (Show)

go-filemutex - Version 1.3 Latest Release

Published by alexflint 9 months ago

Calling Close() on windows no longer fails if UnlockFileEx returns an error since the file still gets closed and locks released no matter what

go-filemutex - Version 1.2

Published by alexflint over 2 years ago

Calling Close() no longer fails on windows when the file lock was never opened (thanks @lujinda!)

go-filemutex - Version 1.1

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.

go-filemutex - Version 1.0

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.