Expand description
git-style registered lock files to make altering resources atomic.
In this model, reads are always atomic and can be performed directly while writes are facilitated by a locking mechanism implemented here.
Lock files mostly gix-tempfile with its auto-cleanup and the following:
- consistent naming of lock files
- block the thread (with timeout) or fail immediately if a lock cannot be obtained right away
- commit lock files to atomically put them into the location of the originally locked file
Limitations
- As the lock file is separate from the actual resource, locking is merely a convention rather than being enforced.
- The limitations of
gix-tempfileapply.
Re-exports
pub use gix_tempfile as tempfile;
Modules
Structs
- Locks a resource to eventually be overwritten with the content of this file.
- Locks a resource to allow related resources to be updated using files.