0

I need to set a callback that will be called every pre-set time, according to a definition in a configuration file - suppose every 10 hours, by using the ACE library. I tried to use ACE_reactor and it seems to work, but it makes the application collapse after about 30 minutes of idle activity. I guess there's a way to do the same by using a timer, but so far I couldn't find a good code sample that demonstrates how to do it. Does anybody know how to do it by using C++ and ACE library? Does ACE have something equivalent to SetWaitableTimer() of Win API?

1 Answers1

0

The ACE Reactor is the way to schedule timers, it works perfect at our side, are you sure you specify the correct timeout?

Johnny Willemsen
  • 2,942
  • 1
  • 14
  • 16
  • Yes, I'm sure. The problem is that in order to use this mechanism, I need to write in its main() function the following command: ACE_Reactor::instance()->run_reactor_event_loop(). It makes the application collapse after about 30 minutes of idle activity. When I comment out this line of code, the application doesn't collapse. I know it sounds very strange, but this is the problem I experience... – user3179744 Jan 23 '14 at 09:04
  • You have to run the reactor in order to let it invoke timers. Not sure why it collapses, ACE is used for a lot of mission critical 24x7 applications and there this all works without problems. – Johnny Willemsen Jan 23 '14 at 09:43