Skip to content

Promote warning to exception in ext/sysvsem - #6013

Closed
kocsismate wants to merge 1 commit into
php:masterfrom
kocsismate:sysvsem-warning
Closed

Promote warning to exception in ext/sysvsem#6013
kocsismate wants to merge 1 commit into
php:masterfrom
kocsismate:sysvsem-warning

Conversation

@kocsismate

Copy link
Copy Markdown
Member

No description provided.

@nikic

Copy link
Copy Markdown
Member

I'm unsure about this one.

@kocsismate

Copy link
Copy Markdown
MemberAuthor

@nikic What's the problem with this one? Isn't it somewhat similar to the cases when we throw if a connection is not open? Or there are use-cases when people (have to) call sem_release() not knowing if the semaphore has already been acquired?

@nikic

Copy link
Copy Markdown
Member

This seems a bit different. It's not about being not open / uninitialized, but about performing an unlock without a lock. Best analogy to other extensions we have would probably be to commit/rollback without starting a transaction.

Then again, unlock without lock does seem like a clear programming error...

@kocsismate

Copy link
Copy Markdown
MemberAuthor

In case of doubt, then the best we can do is to close the PR :) It not a big waste.

@kocsismate
kocsismate deleted the sysvsem-warning branch August 25, 2020 13:08
Sign up for freeto 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.

2 participants

@kocsismate@nikic