Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Concurrency_T.cpp
blob11bbaf82a02e08e6191bc95a9ae6c352a62ae98b
1 #include "ace/Message_Block.h"
2 #include "ace/Singleton.h"
3 #include "ace/Synch_Traits.h"
4 #include "ace/Null_Mutex.h"
6 #include "jaws3/Concurrency_T.h"
8 typedef ACE_Singleton<ACE_Message_Block, ACE_SYNCH_NULL_MUTEX>
9 JAWS_Empty_Message_Block;
12 template <class CONCURRENCY_IMPL>
13 JAWS_Concurrency_Bridge<CONCURRENCY_IMPL>
14 ::JAWS_Concurrency_Bridge (CONCURRENCY_IMPL *impl)
15 : impl_ (impl)
17 if (this->impl_ == 0)
18 this->impl_ = CONCURRENCY_IMPL::instance ();
22 template <class CONCURRENCY_IMPL> int
23 JAWS_Concurrency_Bridge<CONCURRENCY_IMPL>::putq (JAWS_Protocol_Handler *ph)
25 return this->impl_->putq (ph);
29 template <class CONCURRENCY_IMPL> int
30 JAWS_Concurrency_Bridge<CONCURRENCY_IMPL>::getq (JAWS_Protocol_Handler *&ph)
32 return this->impl_->getq (ph);
36 template <class CONCURRENCY_IMPL> void
37 JAWS_Concurrency_Bridge<CONCURRENCY_IMPL>::shutdown ()
39 ACE_Message_Block *empty_mb = JAWS_Empty_Message_Block::instance ();
40 JAWS_CONCURRENCY_TASK *task;
42 task = this->impl_;
43 task->putq (empty_mb);
44 task->wait ();