Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support shared (read-only) locks in addition to exclusive locks #18

Open
bielr opened this issue Oct 31, 2024 · 0 comments
Open

Support shared (read-only) locks in addition to exclusive locks #18

bielr opened this issue Oct 31, 2024 · 0 comments

Comments

@bielr
Copy link

bielr commented Oct 31, 2024

It would be nice if this crate supported read/write locks, which as far as I know, could be easily implemented using libc::LOCK_SH on Unix and removing the minwinbase::LOCKFILE_EXCLUSIVE_LOCK flag on Windows.

The API for this either means a separate SharedLockFile type or changing the type of the LockFile::locked field to an enum (so that the type of locking used can be queried). The former is probably cleaner and can easily be feature-gated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant