Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / CSD_ThreadPool / CSD_TP_Synch_Helper.inl
blob05930380a53859d70ea1d22925b435c0fed3aebb
1 // -*- C++ -*-
2 #include "ace/Guard_T.h"
4 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
6 ACE_INLINE
7 TAO::CSD::TP_Synch_Helper::TP_Synch_Helper()
8   : state_(PENDING),
9     condition_(this->lock_)
13 ACE_INLINE
14 TAO::CSD::TP_Synch_Helper::~TP_Synch_Helper()
18 ACE_INLINE
19 bool
20 TAO::CSD::TP_Synch_Helper::wait_while_pending()
22   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->lock_, false);
24   while (this->state_ == PENDING)
25     {
26       this->condition_.wait();
27     }
29   return (this->state_ == DISPATCHED);
32 ACE_INLINE
33 void
34 TAO::CSD::TP_Synch_Helper::dispatched()
36   ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_);
37   this->state_ = DISPATCHED;
38   this->condition_.signal();
41 ACE_INLINE
42 void
43 TAO::CSD::TP_Synch_Helper::cancelled()
45   ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_);
46   this->state_ = CANCELLED;
47   this->condition_.signal();
50 TAO_END_VERSIONED_NAMESPACE_DECL