Hi list, I am developing applications using the czmq zmq binding. My application uses multiple timers to perform various time dependant actions. I am encountering issues when cancelling timers.
My application is encapsulated within a struct that contains state, sockets, etc which I think is a typical approach. Indeed, this approach seems common within the czmq implementation. I pass this struct into the timer callbacks as the arg parameter so that the timer functions can access some various application state information and sockets while performing their actions. An unfortunate consequence of this usage pattern is that multiple timers share the same arg and due to the internal czmq implementation, when I cancel one timer it results in all timers with a matching arg getting cancelled. This is not what I want to happen. I only want a specific timer to end. Am I missing something? Is there a common design pattern that should be used with timers that avoids this problem? If there is no particular design pattern that is recommended I think I have a modification that could avoid this problem... if indeed it is considered to be a problem. Regards, Chris
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
