-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Delete released lock files on unix #27
Comments
Ups, there's no reason for that, I simply forgot to clean up. |
I'm not sure if I'm doing this incorrectly but it appears that this is happening again on Ubuntu for version 3.0.4. I can see the debug messages coming through and it seems to be acquiring, locking, and releasing correctly, but there are a bunch of Currently I'm using the following: lock_path = out_path + ".lock"
lock = FileLock(lock_path)
try:
with lock.acquire(timeout=10):
...
except Timeout as e:
.... Looking at the source it appears that you removed this functionality again? |
|
This feature request is extremely harmful. Deleting lockfiles on UNIX causes a race condition. Consider the following set of events:
...thus, you have both programs B and C thinking they hold the same lock. On Windows this can't happen, because directory entries can't be deleted until no handles on the files that back them exist. That's untrue on UNIX; thus, different behavior is required. |
After they are released, an attempt is made to delete the lock files in both the
WindowsFileLock
andSoftFileLock
classes, but not inUnixFileLock
. Is there a reason this is missing fromUnixFileLock
? It seems strange that lock files clean up after themselves on some systems but not on others.The text was updated successfully, but these errors were encountered: