-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
filelock expiration #68
Comments
I guess you can achieve it by yourself. For example, you can write a code: if waiting more than 1 hour, just delete the lock file, and retry to acquire the lock. |
Hello, if you make a PR for this (with tests) we would be happy to review it, thanks! |
I am interested in this feature and was wondering how to implement it myself. Is there a recognized method for checking the lock file modification time and then removing it without the danger of race conditions? |
Not that I'm aware of, you'd likely have to do the research and then implement it 😂 |
I was afraid of that. So far, I have not been successful in my investigations and I don't have any expertise in Posix filesystem arcana. In fact, it was Googling this topic that led me to your module. |
Perhaps a new Perhaps this is a starting point? https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition |
To avoid the case where lock files accidentally get left and lock things forever, we could have the process that acquires the lock set an expiration time on the lock. and if it's expired, the other process can assume that the process died or something and delete and re-acquire the lock.
The text was updated successfully, but these errors were encountered: