Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional support for write locks
These write locks prevent accidental misuse of `Synchronizer`s by establishing an advisory lock on the state file using the `flock` system call. Correctly configured writers will check this lock to prevent duplicate writers. The new write locking feature is configured through a new builder type, which provides an alternate way to configure `Synchronizer` options. We can extend this pattern in the future. Write locking functionality is gated behind the `write-lock` flag and therefore has no performance impact when disabled. Benchmarks show an ~1% increase in write latency when the feature is enabled (the first write may experience additional latency as the lock is acquired.)
- Loading branch information