Closed dietelTiMaMi closed 10 months ago
Please restart the check, ran on my fork aftrer removing the chrono literals. they are not available in C++11. It seems the Ubuntu 18 runners are no longer existent
@gummif Could you please relaunch the CI tests? in the first run there was some C++14 code that didn't compile in C++11 inside the test that is now fixed.
I also ran the CI in my fork and except for the Ubuntu 18.04 runners that are no longer existent everything went through.
@gummif
Thanks for restarting the workflow. Do you see any problems for merging this? If you would like to have any changes, I will gladly contribute to be able to use it in our project.
Hi I will try to take a look today.
You decide if the comment is worth fixing, otherwise looks good.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
zmq.hpp | 35 | 70 | 50.0% | ||
<!-- | Total: | 35 | 70 | 50.0% | --> |
Totals | |
---|---|
Change from base Build 5678621379: | 0.7% |
Covered Lines: | 854 |
Relevant Lines: | 982 |
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 ofzmq::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 totests/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 callprocess_event()
without polling for changes before use.