From 9f272ec5e7d34ae7e3a358f7f775fba624706d43 Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Thu, 2 May 2002 21:03:00 +0000 Subject: ChangeLogTag:Thu May 2 14:02:20 2002 Ossama Othman --- ChangeLog | 7 +++++++ ChangeLogs/ChangeLog-02a | 7 +++++++ ChangeLogs/ChangeLog-03a | 7 +++++++ ace/Dev_Poll_Reactor.cpp | 7 ++++++- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 301ea133a8a..0d6edbca004 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu May 2 14:02:20 2002 Ossama Othman + + * ace/Dev_Poll_Reactor.cpp (work_pending_i): + + Take into account pending timers when deciding if there is work + to be done. + Thu May 02 13:34:08 2002 Ossama Othman * ace/Dev_Poll_Reactor.cpp: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 301ea133a8a..0d6edbca004 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Thu May 2 14:02:20 2002 Ossama Othman + + * ace/Dev_Poll_Reactor.cpp (work_pending_i): + + Take into account pending timers when deciding if there is work + to be done. + Thu May 02 13:34:08 2002 Ossama Othman * ace/Dev_Poll_Reactor.cpp: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 301ea133a8a..0d6edbca004 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,10 @@ +Thu May 2 14:02:20 2002 Ossama Othman + + * ace/Dev_Poll_Reactor.cpp (work_pending_i): + + Take into account pending timers when deciding if there is work + to be done. + Thu May 02 13:34:08 2002 Ossama Othman * ace/Dev_Poll_Reactor.cpp: diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp index 79d6e1a2d7c..fc7a70948d1 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -1109,6 +1109,9 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value & max_wait_time) this_timeout = this->timer_queue_->calculate_timeout (&max_wait_time, &timer_buf); + // If "this_timeout" != 0, the poll must timeout to allow timers + // scheduled in the reactor to fire at the appropriate time. + long timeout = (this_timeout == 0 ? -1 /* Infinity */ : this_timeout->msec ()); @@ -1153,7 +1156,9 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value & max_wait_time) if (nfds > -1) this->end_pfds_ = this->start_pfds_ + nfds; - return (nfds > 0 ? 1 : nfds); + // "nfds > 0" means that we have IO events to dispatch. + // "this_timeout != 0" means that we have timers to fire. + return (nfds > 0 || this_timeout != 0 ? 1 : nfds); } -- cgit v1.2.1