summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2001-05-23 22:29:05 +0000
committerSteve Huston <shuston@riverace.com>2001-05-23 22:29:05 +0000
commit3ef65e9b6ead3d15ad138024873a0d9a92df9c7d (patch)
treef98ebc9325bba76efc385e84aaf9c7e1a5a9619d
parent58b1f5f2e3bd1a10913afe31139b3b49a78e3425 (diff)
downloadATCD-3ef65e9b6ead3d15ad138024873a0d9a92df9c7d.tar.gz
ChangeLogTag:Wed May 23 18:22:41 2001 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLogs/ChangeLog-02a9
-rw-r--r--ChangeLogs/ChangeLog-03a9
-rw-r--r--ace/Reactor.cpp26
4 files changed, 49 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c4fd98e67f..aeb29982f2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed May 23 18:22:41 2001 Steve Huston <shuston@riverace.com>
+
+ * ace/Reactor.cpp (run_reactor_event_loop (ACE_Time_Value&, eh)):
+ It is possible for rounding/conversion fudges in calculating
+ the WFMO/select wait time to cause the wait to time out, but the
+ timer queue be not quite ready to expire the next timer. In this
+ case, the ACE_Time_Value won't have been reduced to 0, so the
+ handle_events call is repeated. Fixes Bugzilla # 153.
+
Wed May 23 15:55:21 2001 Steve Huston <shuston@riverace.com>
* ace/Containers_T.h: Fixed comment directing reader to include
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 7c4fd98e67f..aeb29982f2e 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,12 @@
+Wed May 23 18:22:41 2001 Steve Huston <shuston@riverace.com>
+
+ * ace/Reactor.cpp (run_reactor_event_loop (ACE_Time_Value&, eh)):
+ It is possible for rounding/conversion fudges in calculating
+ the WFMO/select wait time to cause the wait to time out, but the
+ timer queue be not quite ready to expire the next timer. In this
+ case, the ACE_Time_Value won't have been reduced to 0, so the
+ handle_events call is repeated. Fixes Bugzilla # 153.
+
Wed May 23 15:55:21 2001 Steve Huston <shuston@riverace.com>
* ace/Containers_T.h: Fixed comment directing reader to include
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 7c4fd98e67f..aeb29982f2e 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,12 @@
+Wed May 23 18:22:41 2001 Steve Huston <shuston@riverace.com>
+
+ * ace/Reactor.cpp (run_reactor_event_loop (ACE_Time_Value&, eh)):
+ It is possible for rounding/conversion fudges in calculating
+ the WFMO/select wait time to cause the wait to time out, but the
+ timer queue be not quite ready to expire the next timer. In this
+ case, the ACE_Time_Value won't have been reduced to 0, so the
+ handle_events call is repeated. Fixes Bugzilla # 153.
+
Wed May 23 15:55:21 2001 Steve Huston <shuston@riverace.com>
* ace/Containers_T.h: Fixed comment directing reader to include
diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp
index bf81a924f52..f8b65761cc9 100644
--- a/ace/Reactor.cpp
+++ b/ace/Reactor.cpp
@@ -191,10 +191,28 @@ ACE_Reactor::run_reactor_event_loop (ACE_Time_Value &tv,
if (eh != 0 && (*eh)(0))
continue;
- else if (result == -1 && this->implementation_->deactivated ())
- return 0;
- else if (result <= 0)
- return result;
+ else if (result == -1)
+ {
+ if (this->implementation_->deactivated ())
+ result = 0;
+ return result;
+ }
+ else if (result == 0)
+ {
+ // handle_events timed out without dispatching anything.
+ // Because of rounding and conversion errors and such, it could
+ // be that the wait loop (WFMO, select, etc.) timed out, but
+ // the timer queue said it wasn't quite ready to expire a
+ // timer. In this case, the ACE_Time_Value we passed into
+ // handle_events won't have quite been reduced to 0, and we
+ // need to go around again. If we are all the way to 0, just
+ // return, as the entire time the caller wanted to wait has been
+ // used up.
+ if (tv.usec () > 0)
+ continue;
+ return 0;
+ }
+ // Else there were some events dispatched; go around again
}
ACE_NOTREACHED (return 0;)