-
Notifications
You must be signed in to change notification settings - Fork 757
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
Feature/expose monitor socket for active poller #612
Feature/expose monitor socket for active poller #612
Conversation
Please restart the check, ran on my fork aftrer removing the chrono literals. |
@gummif Could you please relaunch the CI tests? I also ran the CI in my fork and except for the Ubuntu 18.04 runners that are no longer existent everything went through. |
Thanks for restarting the workflow. |
Hi I will try to take a look today. |
You decide if the comment is worth fixing, otherwise looks good. |
…ter event occurred
Pull Request Test Coverage Report for Build 6106326776
💛 - Coveralls |
Motivation:
zmq::monitor_t
in it's current form is inconvenient to use in combination withzmq::active_poller_t
the issue is, that the socket isn't available to the user of
zmq::monitor_t
Proposal:
split
zmq::monitor_t::check_event()
to move the actual reading and processing of the events into a new protected methodzmq::monitor_t::process_event()
provide a protected socket_ref for using the monitor_socket for polling in a derived class.
Execution:
The proposed changes were done to
zmq.hpp
A test case demonstrating the desired usage was added to
tests/monitor.cpp
By inheriting from
zmq::monitor_t
you can now implement custom ways of polling for socket events.The modified api is hidden for "rookie" users that might accidentaly call
process_event()
without polling for changes before use.