4 ACE_THR_FUNC_RETURN
killer (void *arg
)
6 CORBA::ORB_var orb
= reinterpret_cast<CORBA::ORB_ptr
> (arg
);
8 ACE_DEBUG ((LM_DEBUG
,"(%P|%t) server exiting\n"));
14 Hello::Hello (CORBA::ORB_ptr orb
)
15 : orb_ (CORBA::ORB::_duplicate (orb
)),
22 Hello::set_callback (Test::CallBack_ptr cb
)
24 ACE_DEBUG ((LM_DEBUG
,"(%P|%t) got callback\n"));
25 this->callback_
= Test::CallBack::_duplicate(cb
);
26 this->callback_
->method2();
30 Hello::method (CORBA::Short count
)
32 if (++this->count_
> 10)
34 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) supplied count = %d\n", count
));
35 PortableServer::POA_var poa
= this->_default_POA();
36 PortableServer::POAManager_var mgr
= poa
->the_POAManager();
37 mgr
->hold_requests(false);
38 // Pass duplicated ptr to a thread and let the thread to free the reference.
39 CORBA::ORB_ptr orb
= CORBA::ORB::_duplicate (this->orb_
.in ());
40 ACE_Thread_Manager::instance()->spawn_n (1,
41 ACE_THR_FUNC (killer
),
42 static_cast<void*> (orb
));