[zeromq-dev] Polling API
Martin Sustrik
sustrik at 250bpm.com
Fri Apr 9 17:33:29 CEST 2010
gonzalo diethelm wrote:
> Ok, I'm about ready to commit a patch in this direction. But before I do
> that, another question. I have just realized that Poller objects (and
> the whole zmq_poll() functionality) do not depend on Context at all. In
> other words, I could perfectly change the code to make this possible:
>
> ZMQ.Context c = ZMQ.context(1, 1, ZMQ.POLL); // new Context, same as
> above
> ZMQ.Socket s = c.socket(ZMQ.PUB); // new Socket, same as
> above
> ZMQ.Poller p = ZMQ.poller(3); // new Poller, NO CONTEXT
>
> On the other hand, it may be useful to be able to get the current 0MQ
> Context from a Socket and/or a Poller object (which would force us build
> Pollers from a starting Context):
>
> ZMQ.Context c1 = socket.getContext();
> ZMQ.Context c2 = poller.getContext();
Well, I would say that polling is ripe to get some standardised
interface. Something like epoll/kqueue.
There's one provided by Python binding, now there's Java, Lisp copies
the C interface, not sure about PHP and other languages...
Thoughts anyone?
Martin
More information about the zeromq-dev
mailing list