Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_4080_Regression / test_impl.cpp
blob0106a7436b74ac5942ee152bb77e0d2730a38098
2 #include "test_impl.h"
4 UIPMC_Object_Impl::UIPMC_Object_Impl (CORBA::ORB_ptr orb,
5 CORBA::ULong num_threads)
6 : orb_ (CORBA::ORB::_duplicate (orb))
7 , barrier_ ((unsigned int) num_threads)
8 , lock_ ()
12 UIPMC_Object_Impl::~UIPMC_Object_Impl ()
16 void
17 UIPMC_Object_Impl::process ()
19 ACE_DEBUG ((LM_DEBUG, "Server %t received a message\n"));
20 this->barrier_.wait ();
21 static bool shutdown=false;
22 if (!shutdown)
24 ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_);
25 if (!shutdown)
27 shutdown=true;
28 ACE_DEBUG ((LM_DEBUG, "Server %t Shutting down\n"));
29 try
31 this->orb_->shutdown (false);
33 catch (const CORBA::Exception& ex)
35 ex._tao_print_exception (
36 "Server %t, Exception caught in shutdown():");