[zeromq-dev] Polling API
nicholas at nichol.as
Thu Apr 15 18:58:40 CEST 2010
On Apr 15, 2010, at 6:43 PM, Martin Sustrik wrote:
>>> // Getting events.
>>> int zmq_poller_event (void *poller, zmq_poll_item_t *item, int *events,
>>> void **hint);
>> So, "Getting events" is the part that actually performs the poll operation?
>> Or is that missing here?
> Yes. The point here is to return the events one by one. If there are no
> events to return, it will wait for one. If there is at least one event,
> one of the will be chosen to be returned.
I think we need an option to specify a maximum timeout as well, it would otherwise be difficult to integrate it in an event loop.
>>> Maybe zmq_pollset would be more appropriate than zmq_poller?
>> I vote for zmq_pollset, definitely.
> I like 'pollset' better myself.
More information about the zeromq-dev