diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-12-23 04:18:55 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-12-23 04:18:55 +0000 |
commit | 0bf5888a06a0496ffe1bc1580bfa61a2b2c93558 (patch) | |
tree | a683689cad84a93a6c4e6f1b55c0410c6a92ac03 | |
parent | 41fed94fcc9b38845288886660083546f1d0b521 (diff) | |
download | ATCD-0bf5888a06a0496ffe1bc1580bfa61a2b2c93558.tar.gz |
ChangeLogTag: Sun Dec 22 23:18:58 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 10 | ||||
-rw-r--r-- | TAO/tao/Muxed_TMS.cpp | 48 | ||||
-rw-r--r-- | TAO/tao/Reply_Dispatcher.h | 3 | ||||
-rw-r--r-- | TAO/tao/Reply_Dispatcher.i | 6 |
4 files changed, 61 insertions, 6 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index badea493388..d02f27c2e45 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,13 @@ +Sun Dec 22 23:18:58 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> + + * tao/Reply_Dispatcher.h: + * tao/Reply_Dispatcher.i: Added an accessor for <timeout_> + + * tao/Muxed_TMS.cpp: Call start_dispatch () and end_dispatch () + only if the Reply_Dispatcher has timout associated with it. This + should fix most of the problems that showed up in the latest + builds. + Sun Dec 22 20:22:50 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> * performance-tests/Latency/Thread_Per_Connection/svc.conf: Used diff --git a/TAO/tao/Muxed_TMS.cpp b/TAO/tao/Muxed_TMS.cpp index f235e32cfe7..a046c8cc948 100644 --- a/TAO/tao/Muxed_TMS.cpp +++ b/TAO/tao/Muxed_TMS.cpp @@ -97,6 +97,9 @@ TAO_Muxed_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) int result = 0; TAO_Reply_Dispatcher *rd = 0; + // Does the reply_dispatcher have a timeout? + CORBA::Boolean has_timeout = 0; + // Grab the reply dispatcher for this id. { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, -1); @@ -123,18 +126,51 @@ TAO_Muxed_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) return 0; } - // Just let the Reply_Dispatcher know that dispatching has - // started. - (void) rd->start_dispatch (); + + if (TAO_debug_level > 8) + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t)- TAO_Muxed_TMS::dispatch_reply, " + "id = %d\n", + params.request_id_)); + + if (result != 0) + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%P | %t):TAO_Muxed_TMS::dispatch_reply: ") + ACE_TEXT ("unbind dispatcher failed: result = %d\n"), + result)); + + // This return value means that the mux strategy was not able + // to find a registered reply handler, either because the reply + // was not our reply - just forget about it - or it was ours, but + // the reply timed out - just forget about the reply. + return 0; + } + + has_timeout = rd->has_timeout (); + + if (has_timeout == TAO_Reply_Dispatcher::TIMEOUT) + { + // Only when the RD has a timeout it makes sense to let other + // thread know that we have started dispatching. + // Just let the Reply_Dispatcher know that dispatching has + // started. + (void) rd->start_dispatch (); + } } // Dispatch the reply. // They return 1 on success, and -1 on failure. int retval = rd->dispatch_reply (params); - // Just let the Reply_Dispatcher know that dispatching is done. - (void) rd->end_dispatch (); - + if (has_timeout == TAO_Reply_Dispatcher::TIMEOUT) + { + // Only when the RD has a timeout it makes sense to let other + // thread know that we have finished dispatching. + // Just let the Reply_Dispatcher know that dispatching is done. + (void) rd->end_dispatch (); + } return retval; } diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h index 2cb0069e72f..3e4dac7a424 100644 --- a/TAO/tao/Reply_Dispatcher.h +++ b/TAO/tao/Reply_Dispatcher.h @@ -111,6 +111,9 @@ public: /// set operation is not synchronized. void has_timeout (CORBA::Boolean t); + /// Accessor for <timeout_> and un_synchronized! + CORBA::Boolean has_timeout (void) const; + /// Methods used to change the state to indicate that whether /// dispatching is started or not! void start_dispatch (void); diff --git a/TAO/tao/Reply_Dispatcher.i b/TAO/tao/Reply_Dispatcher.i index f61cbee55ec..9af1da59538 100644 --- a/TAO/tao/Reply_Dispatcher.i +++ b/TAO/tao/Reply_Dispatcher.i @@ -11,3 +11,9 @@ TAO_Reply_Dispatcher::has_timeout (CORBA::Boolean t) { this->timeout_ = t; } + +ACE_INLINE CORBA::Boolean +TAO_Reply_Dispatcher::has_timeout (void) const +{ + return this->timeout_; +} |