-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Create optional lock file for use of the data-store by external process #27
Comments
I am willing to provide a patch but wanted to know if you would be open to accepting it and if adding lockfile from https://github.com/npm/lockfile would be acceptable to implement. |
You can use lockfiles in your own libraries to lock the version of data-store to whatever you want. However, for reasons that will take more time to explain than I have right now, we don't use lockfiles in our libraries. Lockfiles prevent semver from doing it's job, and our experience has been that - between semver and lockfiles - semver is the lesser of two evils. |
@jonschlinkert I don't think @cblauvelt was talking about a package lock file, but a lockfile to only allow a single process to access the file at a time. |
@doowb I was a little confused bye the response and I was trying to figure out how semver would prevent another process from accessing the file while it was being written. @jonschlinkert I am trying to prevent an external process from reading the data-store while the file is being written and I am not trying to implement a package lock file such as that used by npm or yarn. |
Oh like a mutex?
…Sent from my iPhone
On Sep 13, 2019, at 3:59 PM, Brian Woodward ***@***.***> wrote:
@jonschlinkert I don't think @cblauvelt was talking about a package lock file, but a lockfile to only allow a single process to access the file at a time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Got it. Yeah I think you’re looking for atomic writes. Or we can use a mutex, or a combination of those.
…Sent from my iPhone
On Sep 13, 2019, at 4:04 PM, cblauvelt ***@***.***> wrote:
@doowb I was a little confused bye the response and I was trying to figure out how semver would prevent another process from accessing the file while it was being written. @jonschlinkert I am trying to prevent an external process from reading the data-store while the file is being written and I am not trying to implement a package lock file such as that used by npm or yarn.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Exactly like a mutex. |
I would like the option to create a lock file when the data-store is being synchronized. I understand this can cause slow-down so it would be off by default.
The text was updated successfully, but these errors were encountered: