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

feat: blocking parameter on lock constructor with tests and docs #325

Merged
merged 5 commits into from
Apr 27, 2024

Conversation

iamkhav
Copy link
Contributor

@iamkhav iamkhav commented Apr 27, 2024

Hey all, I'm Amon and this is my first PR here. Let me know if something's missing or not up to standards :)

PR Summary

  • Add blocking parameter on lock constructor. Similar in effect to blocking on BaseFileLock.acquire
  • Add tests for a couple of different non-blocking lock cases. This also covers timeout=0 which was the previous way to have a non-blocking lock when using context manager syntax.

I added some docs so this should close #64.

@iamkhav
Copy link
Contributor Author

iamkhav commented Apr 27, 2024

Hey @gaborbernat, thanks for the swift approval! I don't have rights to squash and merge this PR. Feel free to do so whenever it fits.

@gaborbernat gaborbernat merged commit 8556141 into tox-dev:main Apr 27, 2024
31 checks passed
@iamkhav iamkhav deleted the amon/non-blocking-locks branch April 27, 2024 18:02
@gaborbernat gaborbernat mentioned this pull request Sep 7, 2024
@gaborbernat gaborbernat mentioned this pull request Sep 17, 2024
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.

try acquire filelock without blocking (timeout = 0)
2 participants