[zeromq-dev] Polling API
Martin Sustrik
sustrik at 250bpm.com
Thu Apr 15 19:42:32 CEST 2010
Nicholas Piël wrote:
> 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.
Oops! Forgot about it. Your are right.
>>>> Maybe zmq_pollset would be more appropriate than zmq_poller?
>>> I vote for zmq_pollset, definitely.
>> I like 'pollset' better myself.
>
> +1
Looks like there's almost a concensus on pollset being better than poller.
Martin
More information about the zeromq-dev
mailing list