-
Notifications
You must be signed in to change notification settings - Fork 66
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
API is too restrictive for use on Windows. #42
Comments
Is it that the API is too restrictive for use on Windows, or that it doesn't support the full feature set that Windows offers through native APIs? The second part is intentional. My goal when building the package was for building lockfiles separate from the data files it was operating on. So you use a common path to a lockfile, and then if you get that exclusive lock you can start working on the data files. |
Oh. That was not clear to me. Is that reliable? The data files might have unsynced changes, no? I.e. any other processes writing the data files would have to cooperate. (Am no file system expert) |
The other programs would need to try and take the same lockfile before interacting with the data files. This would be application logic that needs to be implemented. |
Thank you for the clarification. I got it working very easily now. Closing. |
The WinAPI LockFileEx function documentation states:
However,
flock.Flock
does not expose itsfh
field. Furthermore,setFh()
is hardcoded to create anos.O_RDONLY
-flagged file handle, excluding write operations even if a user of flock used reflection to obtain the file handle.The text was updated successfully, but these errors were encountered: