Skip to content

[Lock] Added paragraph about auto release #15049

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

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Mar 2, 2021

This will fix symfony/symfony#40325

@twisted1919 is this paragraph helpful? Should I add something more?

@twisted1919
Copy link

I think there should be a note for PCNTL as well, something like:

Please pay special attention when you create a lock and then you call pcntl_fork to create a new process. Resulted process will release the lock when it finishes, leaving the main process unlocked. To prevent this, make sure you do not autoi-release the lock and instead, you release it manually.

Something in between these lines...

Other than this, the info is very helpful, thank you.

@Nyholm
Copy link
Member Author

Nyholm commented Mar 2, 2021

I've updated the PR to use a better PCNTL example and changed the text to be more clear

@twisted1919
Copy link

Looks okay to me, I pointed out a small typo as well, maybe you'll fix that as well.
Thank you :)

@javiereguiluz javiereguiluz merged commit 6e12d6d into symfony:4.4 Mar 5, 2021
@javiereguiluz
Copy link
Member

Tobias, thanks for this contribution and for providing a comprehensive example too.

@Nyholm
Copy link
Member Author

Nyholm commented Mar 5, 2021

Im happy I got all the help from @twisted1919 and the review from @yethee

@Nyholm Nyholm deleted the auto-release branch March 5, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants