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

Fix issue with unlink teardown behavior #774

Merged
merged 11 commits into from Oct 15, 2015
Merged

Fix issue with unlink teardown behavior #774

merged 11 commits into from Oct 15, 2015

Conversation

codemercenary
Copy link
Contributor

This pull request highlights a problem with the way that unlink teardown occurs, specifically during signal unregistration. Fix this problem.

This pull request highlights a problem with the way that unlink teardown occurs, specifically during signal unregistration.  Fix this problem.
@codemercenary
Copy link
Contributor Author

Any questions on this one @veronicaz41?

@veronicaz41
Copy link
Contributor

Still looking at this. Will ask you on slack if I have question.

@veronicaz41
Copy link
Contributor

Ah, in this case AutoSignalTest.OneRemovesAll fails. But why we want clearall run twice? Would it run once be a preferred behavior?
Am I missing something?

@codemercenary
Copy link
Contributor Author

That's the image guarantee. If I have signal B, and I assert B, then all handlers on B at the time of the call must be asserted, even if one of the handlers removes another handler.

The reason for this is that I don't want nondeterministic cases where the order where signal handlers are called affects how many signal handlers are called.

@veronicaz41
Copy link
Contributor

Make sense 👍 Ready for review.

@codemercenary
Copy link
Contributor Author

This solution is correct, excellent work. Can you find a way to implement it that does not require any modification to signal.h? I am trying to prevent that type from getting any more complex, it's already pretty hard to follow as it is.

@veronicaz41
Copy link
Contributor

ok

break;
}

if (m_state == SignalState::Free) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure this is the right answer anymore. Comparing to m_state directly like this is pretty unsafe unless you're doing it in a loop, which we are not.

@codemercenary codemercenary added this to the v0.7.6 milestone Oct 15, 2015
yeswalrus added a commit that referenced this pull request Oct 15, 2015
Fix issue with unlink teardown behavior
@yeswalrus yeswalrus merged commit 0604238 into develop Oct 15, 2015
@yeswalrus yeswalrus deleted the fix-unlinksignal branch October 15, 2015 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants