Skip to content

Commit

Permalink
Add optional support for write locks
Browse files Browse the repository at this point in the history
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.

By default, write locks are disabled and carry no additional cost
through use of generics. Unused functionality is optimized out by
the compiler during monomorphization.

Write locking is only supported on Unix-like platforms due to use
of the `flock` API. Other locking mechanisms and lock modes could
be supported in the future.
  • Loading branch information
austinhartzheim committed Oct 16, 2024
1 parent d012376 commit 01f0122
Show file tree
Hide file tree
Showing 7 changed files with 589 additions and 325 deletions.
Loading

0 comments on commit 01f0122

Please sign in to comment.