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

[11.x] Add isCurrentlyOwnedBy function to lock #51393

Merged
merged 2 commits into from
May 17, 2024

Conversation

gazben
Copy link
Contributor

@gazben gazben commented May 13, 2024

This PR adds support for checking the current owner of a lock. I consider this PR as a follow up to: #49249

We have a use case where we want to check if a given lock is active or not (if it's locked then we don't want to make a function call). Currently I can check if the lock I've created is owned by the process or not with the isOwnedByCurrentProcess but, if the lock is not active, the result will be false and I cannot check if it's false because it's not locked, or its owned by another process.

@gazben gazben changed the title Add isCurrentlyOwnedBy function to lock [11.x] Add isCurrentlyOwnedBy function to lock May 13, 2024
@taylorotwell taylorotwell merged commit bf7046f into laravel:11.x May 17, 2024
28 checks passed
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.

2 participants