[Ace-users] are reactor timeouts delivered asynchronously

sunil sunilsreenivas2001 at yahoo.com
Thu Jan 17 09:52:55 CST 2008

Hey Doug,
 Thanks very much for your reply. I figured easiest way to find this
out is to put the task in debugger and put a breakpoint in
handle_timeout() and handle_input() methods, in both cases the
walkback was ACE_Select_Reactor_Token: handle_events->handle_events_i-
>dispatch->dispatch_io_handlers->dispatch_io_set-> notify_handle-
>handle_input for new client connection requests and
ACE_Select_Reactor_Token: handle_events->handle_events_i->dispatch-
>dispatch_timer_handlers->expire->timeout->handle_timeout() for
timeout requests, which is confirming that for my configuration these
events seem to be delivered synchronously.....
Thanks again for your help,
Best Regards,

On Jan 16, 9:48 pm, "Douglas C. Schmidt" <schm... at dre.vanderbilt.edu>
> 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
> to.
> > Am using following peice of code
> > ACE_Reactor::instance()->schedule_timer(pTimer, 0,
> >                                         pTimer->getInitialDelay(),
> >                                         pTimer->getInterval());
> > in my main thread
> Ok.
> > 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.
> Thanks,
> Doug

More information about the Ace-users mailing list