diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2002-12-14 03:57:29 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2002-12-14 03:57:29 +0000 |
commit | 34ffd98f619616d1350986d7325c9afbe2c60990 (patch) | |
tree | 27618ca676396f67636fa1c919d3e4e60b379959 /ace/Timer_Queue_T.cpp | |
parent | 1ab3c0804d90b9045cded7ac34290e4ee46e9ea8 (diff) | |
download | ATCD-34ffd98f619616d1350986d7325c9afbe2c60990.tar.gz |
ChangeLogTag:Fri Dec 13 16:05:05 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
Diffstat (limited to 'ace/Timer_Queue_T.cpp')
-rw-r--r-- | ace/Timer_Queue_T.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ace/Timer_Queue_T.cpp b/ace/Timer_Queue_T.cpp index 2327c64b532..7ced61d9f87 100644 --- a/ace/Timer_Queue_T.cpp +++ b/ace/Timer_Queue_T.cpp @@ -304,9 +304,16 @@ ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::timeout (TIMER_QUEUE &timer_q const void *act, const ACE_Time_Value &cur_time) { - // Upcall to the <handler>s handle_timeout method. + // Upcall to the <handler>s handle_timeout() method. if (handler->handle_timeout (cur_time, act) == -1) - timer_queue.cancel (handler, 0); // 0 means "call handle_close()". + { + if (handler->reactor ()) + // Call the reactor's cancel_timer() method to minimize locking. + handler->reactor ()->cancel_timer (handler, 0); // 0 means "call handle_close()". + else + // Upcall to the handler's handle_timeout method. + timer_queue.cancel (handler, 0); + } return 0; } |