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
file seems to be locked when setting the data after getting the data #89
Comments
Is there any chance you can provide a stack trace? ie by printing the error object from the main process? |
I was saving too often.
A possible solution was to loop based on the error and re-save.
On Tue, Oct 10, 2017 at 2:55 AM Juan Cruz Viotti ***@***.***> wrote:
Is there any chance you can provide a stack trace? ie by printing the
error object from the main process?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHtIvlLh3SXFIWtZi3IccsYDdLCS-3kZks5sqz8SgaJpZM4Px1NE>
.
--
*Justin Garza*
(818) 251-0647 / jgarza9788@gmail.com
|
@jgarza9788 Saving too often shouldn't be an issue. The test cases perform stress testing on the module, by very quickly writing a thousand entries, even in parallel (https://github.com/electron-userland/electron-json-storage/blob/master/tests/storage.spec.js#L51). Are you sure there is not something else going on with your app? |
Hi @jgarza9788. Good news! I believe I fixed this issue on this PR: #110. Would you mind giving a shot to confirm the issue is ruled out before merging and publishing? Basically the problem was that the locking module I was using was not doing real locking, but just some checks in-memory within the same process, so writing the file from more than one process would trigger the issue. Let me know! |
The text was updated successfully, but these errors were encountered: