[Ace-users] are reactor timeouts delivered asynchronously

sunil sunilsreenivas2001 at yahoo.com
Wed Jan 16 18:56:13 CST 2008


Hello,
 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 AEC 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??
Thanks,
Sunil


More information about the Ace-users mailing list