[ace-users] Question regarding timer IDs in ACE_Timer_Queue

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Mon Jul 9 01:52:53 CDT 2007

Hi Alex,

> I am porting a large code base to a new compiler, 64-bit compliance, etc., and, in so doing, I have upgraded from ACE
> 5.1.14 (circa 2001) to ACE 5.5.x. I had some minor issues, but the port and ACE upgrade have gone mercifully smoothly – a
> credit, no doubt, to the quality of the ACE package and community.
> Onto my question: Our code uses, inter alia, the ACE_Timer_Queue (via ACE_Thread_Timer_Queue_Adapter, using Timer_Heap).
> Last week, I hit a very nasty bug which “went away” when I made changes to a couple places where we assumed that the timer
> IDs had to be strictly greater than zero. Looking at the ACE code, I see no reason why timer IDs can’t be zero ( -1 is the
> “null” value, of course). OTOH, I have to assume that there was a reason why our old code checked for ID > 0 and I want to
> be sure that I’m not breaking something else J
> Has the Timer_Queue implementation changed between 5.1 and 5.5 such that in 5.1 timers were strictly positive and now they
> can have zero-valued IDs?

Steve Huston can give you a more definitive answer, but I don't see any
reason why timer IDs can't be zero.



More information about the Ace-users mailing list