diff options
Diffstat (limited to 'TAO/tao/Leader_Follower.cpp')
-rw-r--r-- | TAO/tao/Leader_Follower.cpp | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/TAO/tao/Leader_Follower.cpp b/TAO/tao/Leader_Follower.cpp deleted file mode 100644 index a16dd4b3979..00000000000 --- a/TAO/tao/Leader_Follower.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// $Id$ - -#include "tao/Leader_Follower.h" -#include "tao/Resource_Factory.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Leader_Follower.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(tao, Leader_Follower, "$Id$") - -TAO_Leader_Follower::~TAO_Leader_Follower (void) -{ - delete this->reactor_; -} - -ACE_SYNCH_CONDITION* -TAO_Leader_Follower::get_next_follower (void) -{ - ACE_Unbounded_Set_Iterator<ACE_SYNCH_CONDITION *> iterator ( - this->follower_set_); - - if (iterator.first () == 0) - // means set is empty - return 0; - - ACE_SYNCH_CONDITION *cond = *iterator; - -#if defined (TAO_DEBUG_LEADER_FOLLOWER) - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) LF::get_next_follower - " - "follower is %x\n", - cond)); -#endif /* TAO_DEBUG_LEADER_FOLLOWER */ - - // We *must* remove it when we signal it so the same condition is - // not signalled for both wake up as a follower and as the next - // leader. - // The follower may not be there if the reply is received while the - // consumer is not yet waiting for it (i.e. it send the request but - // has not blocked to receive the reply yet) - (void) this->remove_follower (cond); // Ignore errors.. - - return cond; -} - -ACE_Reactor * -TAO_Leader_Follower::reactor (void) -{ - if (this->reactor_ == 0) - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock (), 0); - if (this->reactor_ == 0) - { - this->reactor_ = - this->orb_core_->resource_factory ()->get_reactor (); - } - } - return this->reactor_; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Node<ACE_SYNCH_CONDITION*>; -template class ACE_Unbounded_Set<ACE_SYNCH_CONDITION*>; -template class ACE_Unbounded_Set_Iterator<ACE_SYNCH_CONDITION*>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Node<ACE_SYNCH_CONDITION*> -#pragma instantiate ACE_Unbounded_Set<ACE_SYNCH_CONDITION*> -#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_SYNCH_CONDITION*> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |