[Ace-users] [ace-users] are reactor timeouts delivered asynchronously

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Wed Jan 16 20:48:52 CST 2008

Hi Sunil,

To ensure that we have proper version/platform/compiler information,
please make sure you fill out the appropriate problem report form
(PRF), which is in


or in


in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers

> Am using following peice of code
> ACE_Reactor::instance()->schedule_timer(pTimer, 0,
>                                         pTimer->getInitialDelay(),
>                                         pTimer->getInterval());
> in my main thread


> The pTimer is instance of a class that implements handle_timeout()
> method. Now the main thread is waiting for connections. and I think
> somehow by ACE magic handle_input method on some class that accepts
> client connections (an instance of this is created in initialization
> of main thread before it calls run_reactor_event_loop()) gets called
> for each client request. My question is it possible that above timer
> scheduled with reactor is delivered while main thread is in
> handle_input() method (middle of processing a client req i.e. can
> timeout be delivered asynchronously) or is it always guaranteed to be
> delivered synchronously i.e. handle_timeout() and handle_input()
> happen one after another in some order??

There's no one answer to this question since the answer depends on which
version of the Reactor you're using and how you're using it, which is
why you need to use the PRF.  I also recommend you check out Chapters 3
and 4 of C++NPv2 <www.cs.wustl.edu/~schmidt/ACE/book2/>, which explain
how the various Reactors work.



More information about the Ace-users mailing list