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
[email protected]




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" <[email protected]> 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
> > [email protected]
> > 
> > 
> > 
> > 
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to