Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/diPublic
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

ContainerLoader: simplify mutex handling#270

Merged
dg merged 3 commits intonette:masterfromstaabm:patch-1
Oct 26, 2021
Merged

Conversation

staabm
Copy link
Contributor

@staabmstaabm commentedOct 22, 2021
edited
Loading

the code as was before this PR, did not release the file-mutex on e.g. one of theNette\IOException throwing cases

@staabmstaabm changed the titleContainerLoader: make sure file-muted is released when exceptions are thrownContainerLoader: make sure file-mutex is released when exceptions are thrownOct 22, 2021
@milo
Copy link
Member

Some prove that the lock was not released?

@staabm
Copy link
ContributorAuthor

You mean a unit test?

@dg
Copy link
Member

dg commentedOct 24, 2021

I think theflock($handle, LOCK_UN) is completely unnecessary in the current code and thus your modification has no effect.

@staabm
Copy link
ContributorAuthor

So the idea is: it is useless because the handle is stored in a local variable which frees the handle and the lock when the variable is going out of scope?

@dg
Copy link
Member

dg commentedOct 24, 2021

Yeah, exactly.

@staabmstaabm changed the titleContainerLoader: make sure file-mutex is released when exceptions are thrownContainerLoader: simplify mutex handlingOct 26, 2021
@staabm
Copy link
ContributorAuthor

as discussed, I adjusted the PR to remove the UNLOCK line (and added a comment).

@dg
Copy link
Member

dg commentedOct 26, 2021

Thanks

@dgdg merged commit6c57b33 intonette:masterOct 26, 2021
@staabmstaabm deleted the patch-1 branchOctober 26, 2021 09:03
dg pushed a commit that referenced this pull requestOct 26, 2021
dg pushed a commit that referenced this pull requestOct 26, 2021
dg added a commit that referenced this pull requestApr 20, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@staabm@milo@dg

[8]ページ先頭

©2009-2025 Movatter.jp