Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_4080_Regression / test_impl.cpp
blobc5cab70f9d548e67930d6a34189892e583c45b61
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 (void)
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 (0);
33 catch (const CORBA::Exception& ex)
35 ex._tao_print_exception (
36 "Server %t, Exception caught in shutdown():");