Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Stack_Recursion / Server_Task.cpp
blob5a3cf60f5398e6fa0bb8c11465589498dcbacc60
2 #include "Server_Task.h"
3 #include "Sender.h"
5 Server_Task::Server_Task (CORBA::ORB_ptr orb,
6 const Sender *sender,
7 ACE_Thread_Manager *thr_mgr)
8 : ACE_Task_Base (thr_mgr)
9 , orb_ (CORBA::ORB::_duplicate (orb))
10 , sender_ (sender)
14 int
15 Server_Task::svc (void)
17 ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting server task\n"));
18 try
20 while (!this->sender_->is_done ())
22 // run the test for at most 120 seconds...
23 ACE_Time_Value tv (240, 0);
24 this->orb_->run (tv);
28 catch (const CORBA::Exception&)
30 return -1;
32 ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server task finished\n"));
33 return 0;