-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix race conditions #55
Conversation
It doesn’t work on windows: I don’t know how to fix that. |
Maybe using this hint? |
No, that wouldn’t help. I would have to release the lock first before deleting the file and that would enable the race condition again. |
A possible workaround might be to remove all file contents, release the lock and then unlink the file. When reading the file and it’s empty we could handle it the same way as if it didn’t exist at all. |
As a workaround for windows we now retry to delete the file after releasing the lock if the first delete attemt fails (84f52c9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #54
I found another race condition and fixed it in d6fd14b but I’m not sure if this works on all platforms.