Skip to content
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

Test refactor, timeout=0 fix, and PIDLockFile fix #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gdub
Copy link

@gdub gdub commented Apr 22, 2014

Summary of changes:

  • Tests refactored to remove duplication and split into two classes (one for threaded distinction and one for non-threaded distinction) for localizing the differences between the behavior in each style of operation.
  • The previous fix for the timeout=0 bug still exhibited the same bug as before. Switched to using a conditional expression instead of relying on short-circuit logic.
  • The PIDLockFile class was throwing an error when subsequently acquiring the lock in the same process/thread, complaining that the file already existed. To fix this, I added a check in acquire that returns immediately if self.i_am_locking() is True.
  • Added Python 3.4 to the tox config.

…quent attempts to acquire lock when running in the same thread/process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant