diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-04 16:46:03 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-04 16:46:03 +0000 |
commit | 56bd6cc8a729ba02d0db56b582faaea23b08a260 (patch) | |
tree | e72695996dd646adbb397e21377c1b998278adb1 /ace/TP_Reactor.cpp | |
parent | a2eb9938b994adb23985279d9eaca496eef095d5 (diff) | |
download | ATCD-56bd6cc8a729ba02d0db56b582faaea23b08a260.tar.gz |
Allow signaling the token and wake up all thread. Added checking of token state in handle_events
Diffstat (limited to 'ace/TP_Reactor.cpp')
-rw-r--r-- | ace/TP_Reactor.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp index a972cde702f..510959269ef 100644 --- a/ace/TP_Reactor.cpp +++ b/ace/TP_Reactor.cpp @@ -118,8 +118,14 @@ ACE_TP_Reactor::handle_events (ACE_Time_Value *max_wait_time) // them up, just queue up in the thread pool. int result = 0; ACE_MT (result = this->token_.acquire_read (&ACE_TP_Reactor::no_op_sleep_hook)); - if (result == -1) - return -1; + switch (result) + { + case 2: + ACE_MT (this->token_.release ()); + return 0; + case -1: + return -1; + } // We got the lock, lets handle some events. Note: this method will // *not* dispatch any handlers. It will dispatch timeouts and |