blob: 0106a7436b74ac5942ee152bb77e0d2730a38098 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include "test_impl.h"
UIPMC_Object_Impl::UIPMC_Object_Impl (CORBA::ORB_ptr orb,
CORBA::ULong num_threads)
: orb_ (CORBA::ORB::_duplicate (orb))
, barrier_ ((unsigned int) num_threads)
, lock_ ()
{
}
UIPMC_Object_Impl::~UIPMC_Object_Impl ()
{
}
void
UIPMC_Object_Impl::process ()
{
ACE_DEBUG ((LM_DEBUG, "Server %t received a message\n"));
this->barrier_.wait ();
static bool shutdown=false;
if (!shutdown)
{
ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_);
if (!shutdown)
{
shutdown=true;
ACE_DEBUG ((LM_DEBUG, "Server %t Shutting down\n"));
try
{
this->orb_->shutdown (false);
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception (
"Server %t, Exception caught in shutdown():");
}
}
}
}
|