-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Console] Expand LockableTrait API #61273
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
base: 7.4
Are you sure you want to change the base?
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Hey! Thanks for your PR. You are targeting branch "7.4" but it seems your PR description refers to branch "feature/expand-lockabletrait-api on 7.4". Cheers! Carsonbot |
@chalasr Could you take a quick look at this PR? 🙂 |
Looks sensible. Can you check if there is some test case covering LockableTrait and, if any, update it according to this change? |
Hi, after studying the code more thoroughly, I concluded that If we apply the change I proposed, there's still an issue where This can be handled fairly simply in The only idea I have so far is to use the Maybe someone has better suggestions? |
This change safely extends the lock() method to allow manual control over lock release in the parent process.
This is necessary when the main process forks: the previously introduced automatic lock release (enabled by default) triggers upon the destruction of the lock object. As a result, when a forked child process terminates, it unintentionally releases the lock for all processes.
This update ensures that lock release can be explicitly managed to avoid premature unlocking in such scenarios.