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

Option not to raise when leaving context manager after lock expiration #3532

Open
julianolm opened this issue Feb 27, 2025 · 1 comment · May be fixed by #3531
Open

Option not to raise when leaving context manager after lock expiration #3532

julianolm opened this issue Feb 27, 2025 · 1 comment · May be fixed by #3531

Comments

@julianolm
Copy link

Description

I was having trouble using async locks with the context manager because it was failing when exiting the context manager after timeout had expired (even if my code executed successfully).

I would really like not to raise a LockNotOwnedError in the exit of the context manager (if I try to release a lock and it was already "released" then great!).

I understand just changing the behavior would be critical, so I added an option to just behave this way when desired instead.

PR: #3531

@petyaslavova
Copy link
Collaborator

Thank you for your contribution, I am already looking at the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants