Safelock
License: MIT
View/Download: https://github.com/mpx/safelock/
Safelock is a file-based locking primitive which provides mutual exclusion between unrelated processes and threads.
Safelock offers advantages over POSIX and BSD file locks such as:
- Compatibility with multi-threaded applications
- Support for lock attempt timeouts
- Detection of crashed lock holders
- Detailed lock status (PID, lock age, custom data)
The source and documentation is available on Github.