2 #include "Client_Task.h"
3 #include "ace/OS_NS_unistd.h"
5 Client_Task::Client_Task (Test::Sender_ptr reply_gen
,
7 ACE_Thread_Manager
*thr_mgr
,
8 Receiver_i
* receiver_impl
)
9 : ACE_Task_Base (thr_mgr
)
10 , sender_(Test::Sender::_duplicate (reply_gen
))
11 , us_ (Test::Receiver::_duplicate (us
))
12 , receiver_impl_ (receiver_impl
)
18 Client_Task::svc (void)
20 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting client task\n"));
24 for (int i
= 0; i
!= 1; ++i
)
27 "TAO (%P|%t) sending oneways...\n"));
29 this->sender_
->send_ready_message (this->us_
.in ());
32 // sleeps are evil but 1 sec or so is an improvement on the minute plus
33 // this poorly implemented test used to take
34 while (this->receiver_impl_
->no_calls_
< 10)
37 catch (const CORBA::Exception
& ex
)
39 ex
._tao_print_exception ("Caught Exception");
42 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Client task finished\n"));