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)