summaryrefslogtreecommitdiff
path: root/ace/WFMO_Reactor.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-05-09 06:07:21 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-05-09 06:07:21 +0000
commit6cf7844f97156c4e28c0bdcf531359ec47a8a72c (patch)
tree013c2ed62fa75c37735302eb0862c1fe824d24eb /ace/WFMO_Reactor.cpp
parent617b903e8e82445ee0f765f17571b27ab7807ce1 (diff)
downloadATCD-6cf7844f97156c4e28c0bdcf531359ec47a8a72c.tar.gz
ChangeLogTag: Thu May 09 00:38:22 2002 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'ace/WFMO_Reactor.cpp')
-rw-r--r--ace/WFMO_Reactor.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp
index cb674dd425c..0e8c79ebe8d 100644
--- a/ace/WFMO_Reactor.cpp
+++ b/ace/WFMO_Reactor.cpp
@@ -1603,25 +1603,26 @@ ACE_WFMO_Reactor::event_handling (ACE_Time_Value *max_wait_time,
// called.
ACE_Countdown_Time countdown (max_wait_time);
- // Check to see if it is ok to enter ::WaitForMultipleObjects
- // This will acquire <this->lock_> on success
- // On failure, the lock will not be acquired
- int result = this->ok_to_wait (max_wait_time, alertable);
- if (result != 1)
- return result;
+ int result;
+ do
+ {
+ // Check to see if it is ok to enter ::WaitForMultipleObjects
+ // This will acquire <this->lock_> on success On failure, the
+ // lock will not be acquired
+ result = this->ok_to_wait (max_wait_time, alertable);
+ if (result != 1)
+ return result;
- // Increment the number of active threads
- this->active_threads_++;
+ // Increment the number of active threads
+ this->active_threads_++;
- // Release the <lock_>
- this->lock_.release ();
+ // Release the <lock_>
+ this->lock_.release ();
- // Update the countdown to reflect time waiting to play with the
- // mut and event.
- countdown.update ();
+ // Update the countdown to reflect time waiting to play with the
+ // mut and event.
+ countdown.update ();
- do
- {
// Calculate timeout
int timeout = this->calculate_timeout (max_wait_time);