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

Enhance autowiring::signal and provide strong sequentiality guarantees #757

Merged
merged 2 commits into from Sep 30, 2015

Conversation

codemercenary
Copy link
Contributor

We need a major refactor to the internals of autowiring::signal to allow it to behave more predictably when clients use handlers that either invoke other signals or register/unregister other signal handlers. The newly refactored autowiring::signal should have the following improvements and design choices:

  • Make use of a lock-free dispatch queue concept to allow us to relax the constraint that all locks are released before handing controls to clients.
  • Introduce an image guarantee which ensures that all signal handlers registered at the time of a call are actually invoked, even if some of them are unregistered.
  • Improve efficiency by only taking copies of input arguments when it is absolutely necessary for concurrency reasons
  • If a user passes an argument as an rvalue reference or by value, move that argument into the dispatch queue rather than taking a copy--but only do so if it is necessary

We need a major refactor to the internals of `autowiring::signal` to allow it to behave more predictably when clients use handlers that either invoke other signals or register/unregister other signal handlers.  The newly refactored `autowiring::signal` should have the following improvements and design choices:

* Make use of a lock-free dispatch queue concept to allow us to relax the constraint that all locks are released before handing controls to clients.
* Introduce an image guarantee which ensures that all signal handlers registered at the time of a call are actually invoked, even if some of them are unregistered.
* Improve efficiency by only taking copies of input arguments when it is absolutely necessary for concurrency reasons
* If a user passes an argument as an rvalue reference or by value, move that argument into the dispatch queue rather than taking a copy--but only do so if it is necessary
yeswalrus added a commit that referenced this pull request Sep 30, 2015
Enhance autowiring::signal and provide strong sequentiality guarantees
@yeswalrus yeswalrus merged commit a39b809 into develop Sep 30, 2015
@yeswalrus yeswalrus deleted the feature-sequencedsignal branch September 30, 2015 19:11
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.

None yet

2 participants