diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-05-02 21:03:00 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-05-02 21:03:00 +0000 |
commit | 9f272ec5e7d34ae7e3a358f7f775fba624706d43 (patch) | |
tree | f7e03f61840501db157440036da67ec9f00ee609 | |
parent | 784c1597f0057aecdf7cc2ec5ec29772afca9412 (diff) | |
download | ATCD-9f272ec5e7d34ae7e3a358f7f775fba624706d43.tar.gz |
ChangeLogTag:Thu May 2 14:02:20 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 7 | ||||
-rw-r--r-- | ace/Dev_Poll_Reactor.cpp | 7 |
4 files changed, 27 insertions, 1 deletions
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 <ossama@uci.edu> + + * 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 <ossama@uci.edu> * 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 <ossama@uci.edu> + + * 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 <ossama@uci.edu> * 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 <ossama@uci.edu> + + * 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 <ossama@uci.edu> * 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); } |