-
-
Notifications
You must be signed in to change notification settings - Fork 127
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 using a Conf store from multiple processes #146
Comments
I added a note to the readme: ce1dcee I simply never considered this use-case. It would be nice to support though, but it would require locking the store file during read/write, and the file locking story in Node.js is not great. We would also need to read the config from disk on write and merge it in before writing. |
I had a crack at working around this using https://www.npmjs.com/package/lockfile but this was a non-starter since For my use-case I (was) using a I wonder if there's some way to do a synchronous wait that doesn't involve assaulting the cpu/disk with a |
There is, by Sindre: https://github.com/sindresorhus/make-synchronous |
Actually, https://github.com/sindresorhus/sleep-synchronously would be better for this purpose. |
Currently if you have multiple processes using
conf
with the same storage location they can, and do, clobber each other's data.e.g.
Any suggestions on how to work around this?
I feel like this could warrant a big disclaimer in the readme.
The text was updated successfully, but these errors were encountered: