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

Support polling_interval when using locks as context managers #400

Open
asaf-kali opened this issue Feb 23, 2025 · 0 comments
Open

Support polling_interval when using locks as context managers #400

asaf-kali opened this issue Feb 23, 2025 · 0 comments

Comments

@asaf-kali
Copy link

Hi,

In the public acquire interface, you can pass poll_interval (defaults to 0.05). Because the __enter__ method calls acquire without any arguments, there is no way to specify the interval when using FileLock as a context manager.

I suggest adding poll_interval to FileLock.__init__, such that you can control the default (and as such, propagate it down to acquire when no value is given there).

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

No branches or pull requests

1 participant