-
Notifications
You must be signed in to change notification settings - Fork 758
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
Poll monitoring sockets #109
Comments
I have just split the blocking function without breaking the existing interface. the socket is currently not public, but I have a similar use case like you describe and might adopt it to be able to poll on the monitor and other socket in one poll item. But before I do this I would like to measure if this has a performance advantage over having 2 poll items. Implicit conversion, like you suggest, is imho not like it should be in C++ since C++ should be type safe and strong typed. |
Hey, I'm also missing this feature. Why not making monitor_t inherit from socket_t? IMHO, this would be a better RAII design (see #381), and force the user to configure the monitor in the constructor instead of using init() method. |
I think it is not necessary, it would be sufficient if a method were added to
I agree that the |
I added a Pull Request (#612) to expose the monitor socket for using it with an active poller from the hppaddon.cpp |
I would like to be able to use
zmq::poll()
for normal ZMQ sockets and monitoring ZMQ sockets, to handle them all within a single thread. However this isn't currently possible with thezmq::monitor_t
class due to the blocking nature of thezmq::monitor_t::monitor()
method and the lack of an accessor for the socket that is monitoringsocketPtr
.Could we augment the
zmq::monitor_t
class with the functionality to allow polling? Perhaps something like the following would work (apologies in advance for syntax)...This would allow a usage similar to the following...
I can put a pull request together if it sounds like a reasonable idea.
The text was updated successfully, but these errors were encountered: