diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-05 10:32:55 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-05 10:32:55 +0000 |
commit | 756d26c790233b86d00b7b61f380151c0eb8495f (patch) | |
tree | 9d415f5f6ca6a6c809b0e5507ba498293e98a8dd /TAO/tao/Wait_Strategy.cpp | |
parent | 7cffe1e012fe645f4413b7386cc79d6f7c6e59c8 (diff) | |
download | ATCD-756d26c790233b86d00b7b61f380151c0eb8495f.tar.gz |
ChangeLogTag: Sat Feb 05 04:24:09 2000 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Wait_Strategy.cpp')
-rw-r--r-- | TAO/tao/Wait_Strategy.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index 064508d4208..9ad209b0a2e 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -235,7 +235,7 @@ TAO_Exclusive_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // // Begin artificial scope for auto_ptr like helpers calling: // leader_follower.set_client_thread () and (maybe later on) - // leader_follower.set_leader_thread (). + // leader_follower.set_client_leader_thread (). // { // Calls leader_follower.set_client_thread () on construction and @@ -245,9 +245,9 @@ TAO_Exclusive_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, ACE_Countdown_Time countdown (max_wait_time); - // Check if there is a leader, but the leader is not us - if (leader_follower.leader_available () - && !leader_follower.is_leader_thread ()) + // Check if there is a leader. Note that it cannot be us since we + // gave up our leadership when we became a client. + if (leader_follower.leader_available ()) { // = Wait as a follower. @@ -358,11 +358,12 @@ TAO_Exclusive_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // leader or we are doing nested upcalls in this case we do // increase the refcount on the leader in TAO_ORB_Core. - // Calls leader_follower.set_leader_thread () on construction and - // leader_follower.reset_leader_thread () on destruction. - // Note that this may increase the refcount of the leader. - TAO_LF_Leader_Thread_Helper leader_thread_helper (leader_follower); - ACE_UNUSED_ARG (leader_thread_helper); + // Calls leader_follower.set_client_leader_thread () on + // construction and leader_follower.reset_client_leader_thread () + // on destruction. Note that this may increase the refcount of + // the leader. + TAO_LF_Client_Leader_Thread_Helper client_leader_thread_helper (leader_follower); + ACE_UNUSED_ARG (client_leader_thread_helper); { ACE_GUARD_RETURN (ACE_Reverse_Lock<ACE_SYNCH_MUTEX>, rev_mon, @@ -415,7 +416,7 @@ TAO_Exclusive_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // // End artificial scope for auto_ptr like helpers calling: // leader_follower.reset_client_thread () and (maybe) - // leader_follower.reset_leader_thread (). + // leader_follower.reset_client_leader_thread (). // // Wake up the next leader, we cannot do that in handle_input, @@ -653,7 +654,7 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // // Begin artificial scope for auto_ptr like helpers calling: // leader_follower.set_client_thread () and (maybe later on) - // leader_follower.set_leader_thread (). + // leader_follower.set_client_leader_thread (). // { // Calls leader_follower.set_client_thread () on construction and @@ -663,9 +664,9 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, ACE_Countdown_Time countdown (max_wait_time); - // Check if there is a leader, but the leader is not us - if (leader_follower.leader_available () - && !leader_follower.is_leader_thread ()) + // Check if there is a leader. Note that it cannot be us since we + // gave up our leadership when we became a client. + if (leader_follower.leader_available ()) { // = Wait as a follower. @@ -763,11 +764,12 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // leader or we are doing nested upcalls in this case we do // increase the refcount on the leader in TAO_ORB_Core. - // Calls leader_follower.set_leader_thread () on construction and - // leader_follower.reset_leader_thread () on destruction. - // Note that this may increase the refcount of the leader. - TAO_LF_Leader_Thread_Helper leader_thread_helper (leader_follower); - ACE_UNUSED_ARG (leader_thread_helper); + // Calls leader_follower.set_client_leader_thread () on + // construction and leader_follower.reset_client_leader_thread () + // on destruction. Note that this may increase the refcount of + // the leader. + TAO_LF_Client_Leader_Thread_Helper client_leader_thread_helper (leader_follower); + ACE_UNUSED_ARG (client_leader_thread_helper); { ACE_GUARD_RETURN (ACE_Reverse_Lock<ACE_SYNCH_MUTEX>, rev_mon, @@ -816,7 +818,7 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // // End artificial scope for auto_ptr like helpers calling: // leader_follower.reset_client_thread () and (maybe) - // leader_follower.reset_leader_thread (). + // leader_follower.reset_client_leader_thread (). // // Wake up the next leader, we cannot do that in handle_input, |