summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2002-12-14 03:57:29 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2002-12-14 03:57:29 +0000
commit34ffd98f619616d1350986d7325c9afbe2c60990 (patch)
tree27618ca676396f67636fa1c919d3e4e60b379959
parent1ab3c0804d90b9045cded7ac34290e4ee46e9ea8 (diff)
downloadATCD-34ffd98f619616d1350986d7325c9afbe2c60990.tar.gz
ChangeLogTag:Fri Dec 13 16:05:05 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLogs/ChangeLog-03a6
-rw-r--r--ace/Timer_Queue_T.cpp11
3 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c3a435b578..249f0d89aae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Dec 13 16:05:05 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/Timer_Queue_T.cpp (timeout): Optimize Steve's patch below
+ for the case where the upcall is coming from a reactor. Thanks
+ to Irfan for pointing this out.
+
Fri Dec 13 21:12:29 2002 Steve Huston <shuston@riverace.com>
* ace/test_config.h: Add __hpux to the conditions needed to instantiate
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 2c3a435b578..249f0d89aae 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,9 @@
+Fri Dec 13 16:05:05 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/Timer_Queue_T.cpp (timeout): Optimize Steve's patch below
+ for the case where the upcall is coming from a reactor. Thanks
+ to Irfan for pointing this out.
+
Fri Dec 13 21:12:29 2002 Steve Huston <shuston@riverace.com>
* ace/test_config.h: Add __hpux to the conditions needed to instantiate
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;
}