[ace-users] Question regarding timer IDs in ACE_Timer_Queue

Alex Blate Alex.Blate at sylantro.com
Mon Jul 9 12:22:12 CDT 2007

That's a good enough sanity check for me :-) 


Thanks to Steve and Doug for the quick and thorough responses. 


Best Regards,


Alex Blate



This message is hereby marked SYLANTRO CONFIDENTIAL, is intended only
for the use of the individual or individuals to which it is addressed
and shall not be disclosed or made available to any other party except
with the prior written consent of the sender. If the reader of this
message is not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this message is strictly
prohibited. If you have received this communication in error, please
notify us immediately by replying to the sender of this E-Mail.


From: Steve Huston [mailto:shuston at riverace.com] 
Sent: Monday, July 09, 2007 9:44 AM
To: Alex Blate; ace-users at cse.wustl.edu
Subject: RE: [ace-users] Question regarding timer IDs in ACE_Timer_Queue


Hi Alex,


As Doug indicated, a 0 timer ID is legit. I made some changes to
ACE_Timer_Heap about 6 years ago:


Wed May 23 15:55:21 2001  Steve Huston  <shuston at riverace.com>


        * ace/Containers_T.h: Fixed comment directing reader to include
          ace/Unbounded_Queue.h (rather than _Set.h) for


        * ace/Timer_Heap_T.{cpp h}: Changed the free IDs list from a
          to a round-robin list. Newly-allocated IDs keep increasing til
          there aren't any more, then wrap around to the lowest numbered
          free ID and start again. This is a ease-of-use improvement to
          help applications catch their timer-related errors easier,
          which is apparantly important, especially in multi-threaded

which may explain this change.



Steve Huston, Riverace Corporation
Would you like ACE to run great on your platform?
See http://www.riverace.com/sponsor.htm

	-----Original Message-----
	From: ace-users-bounces at cse.wustl.edu
[mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of Alex Blate
	Sent: Sunday, July 08, 2007 8:59 PM
	To: ace-users at cse.wustl.edu
	Subject: [ace-users] Question regarding timer IDs in

	ACE Users:


	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 :-)


	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? 


	I just would like a sanity check in case my bug went away for
some other reason or, being timing-related, is just hiding from me. 


	I did not fill out the PRF because I consider this a question
about a change in your underlying implementation, rather than a bug :-)


	Alex Blate

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20070709/05f9e941/attachment.htm

More information about the Ace-users mailing list