[ace-users] timer behavior change with ACE 5.5
James DeCocq (jadecocq)
jadecocq at cisco.com
Thu Jun 21 17:22:53 CDT 2007
ACE VERSION: 5.5.8
HOST MACHINE and OPERATING SYSTEM:
HPxw4400 Intel Core2 6600 2GB; XP Pro SP2
TARGET MACHINE and OPERATING SYSTEM,
THE $ACE_ROOT/ace/config.h FILE
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
// #define ACE_NTRACE 0
MSVC++, Visual Studio 2005
DOES THE PROBLEM AFFECT:
[Please indicate whether ACE, your application, or both are
We are upgrading to latest ACE 5.5 while moving our project to
Timers work only sporadically in our application after upgrade to
The code has been running succesfully for years under ACE 5.4 and
*** Any suggestions of potential causes, fixes, or areas of
*** are much appreciated. Thanks very much.
None of the code is new, it has been working for 4 years, but
working with ACE 5.5.
1. An ACE_Task derived object handles timer functionality. The code
spread out and interspersed with app logic, so I'll paraphrase
class ReactiveTask: public ACE_Task
virtual int svc();
virtual int handle_input(ACE_HANDLE);
rns = new ACE_Reactor_Notification_Strategy
(reaktor, this, ACE_Event_Handler::READ_MASK);
2. A heartbeat timer is set.
timerID = reaktor->schedule_timer(this, userData, period,
3. Now, on any particular execution of the app, the timer either
always or not at all. When not, the schedule_timer call is
but handle_timeout is not called. It sounds screwy, but on
app after a full release rebuild, timers may work as expected,
after shutting down the app and restarting, will likely no longer
Also curious, a debug build will not fail as easily.
4. Thanks very much for any suggestions you may have.
More information about the Ace-users