-
Notifications
You must be signed in to change notification settings - Fork 88
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if the lock is taken #21
Comments
You mean, testing if the lock is taken, and then aborting? |
Same request here. I use predis locks. In some cases I don't want to wait until the lock is released, but abort the request if another process is already holding that lock. |
Yes, check if the lock is taken and if so throw an exception |
I don't have any plans to add this feature. However, I'm willing to take in any pull requests that add this feature. If you want to create a PR for this, please discuss the interface here first. |
If the Loop class had an ability to pass a flag to disable retries or set X retries instead of using timeout this could help this out etc. |
Hi. I would avoid to introduce a second timeout because funky things might happen. I would suggest the use of a flag to enable/disable the loop to execute more than once or till the locks ttl expire. |
"workaround", use Symfony Lock instead - https://symfony.com/doc/5.x/components/lock.html#usage |
Hi! We encountered a situation when we would like to terminate all the calls when a locked call is already in execution (instead of waiting). @malkusch do you plan to extend the library with this feature in the near future? 馃憤
The text was updated successfully, but these errors were encountered: