[zeromq-dev] How to cancel a timer in zloop
Bo Xiao
mail.xiaobo at gmail.com
Sat May 14 16:41:13 CEST 2011
Hi Pieter,
After looking into the source, I find there is no easy way to add support for removing a timer without breaking current API. A reader is associated with a socket, so we can unregistered reader by calling zloop_cancel (zloop_t *self, void *socket) with a specific socket as parameter. But for a timer, when created and registered in a zloop, there is no handle or something similar returned by any API calls. So my attempt to patch it by adding a similar API like zloop_cancel_timer failed.
Any ideas to maintain compatibility?
Kind regards,
- Bo
mail.xiaobo at gmail.com
On 14 May 2011, at 6:54 PM, Pieter Hintjens wrote:
> Do you want to try patching zloop to add this? Otherwise I'll do it, it'll take a few days, I'm traveling right now.
>
> -Pieter
>
> On 14 May 2011 11:41, "Bo Xiao" <mail.xiaobo at gmail.com> wrote:
> > Hi all,
> > I'm using zeromq c binding czmq master in my project. czmq provide a runloop implementation that's easy to use, but there is no way to cancel a timer registered in a zloop, which is very inconvenient. any ideas to this problem?
> >
> > thanks in advance.
> >
> >
> >
> > Kind regards,
> >
> > - Bo
> > mail.xiaobo at gmail.com
> >
> >
> >
> >
> _______________________________________________
> 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/20110514/f964e49a/attachment-0001.htm>
More information about the zeromq-dev
mailing list