[zeromq-dev] zmq_monitor

MinRK benjaminrk at gmail.com
Thu Sep 13 00:57:55 CEST 2012


On Wed, Sep 12, 2012 at 3:39 PM, Justin Cook <jhcook at gmail.com> wrote:

> On Wednesday, 12 September 2012 at 23:16, Paul Colomiets wrote:
> > In my opinion it's wrong to provide callback interface for ZMQ_MONITOR
> > in scripting languages.
> >
> > Thoughts?
> Scripting language is fairly vague. Python is an interpreted language that
> is used in large codebases. What's wrong with providing a callback for
> ZMQ_MONITOR?
>
> MinRK has a valid point. Is it just too much work and/or expensive to put
> this on sockets and not the context? It makes 100% sense to put this in
>  individual sockets versus the entire context.
>

I don't think it's too much work, since the first implementation did
exactly this, if I read correctly.  There was an issue with the
implementation being made via setsockopt, which prompted a cleaner
interface by adding a dedicated method.  This was done as
zmq_ctx_set_monitor instead of zmq_socket_set_monitor, but I can find no
evidence of the reasoning behind this decision.  Perhaps that happened on
IRC.

Re: inproc, I think that makes a certain amount of sense.  I've been
thinking of various ways to avoid grabbing the GIL in io_threads and I
think an approach with inproc can work.  Quick question:  Are there
threadsafety issues when there is more than one io thread?  Do I need one
inproc socket per io-thread, and if so, how do I make sure I use the right
one from the right thread?

-MinRK


> --
> Justin Cook
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120912/0e2a6ffe/attachment.html>


More information about the zeromq-dev mailing list