Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Bug_1551_Regression / Hello.cpp
blob4ffc42f9f6565cd4147b55759ffc8d0672e7e2e9
1 #include "Hello.h"
2 #include "ace/OS_NS_unistd.h"
4 Hello::Hello(
5 CORBA::ORB_ptr orb,
6 bool simulate_crashes)
7 : orb_ (CORBA::ORB::_duplicate (orb))
8 , simulate_crashes_(simulate_crashes)
9 , atomic_counter_(200)
13 void
14 Hello::short_sleep ()
16 long count = atomic_counter_--;
18 #if 0
19 if(count % 40 == 0)
21 ACE_DEBUG((LM_DEBUG, "(%P|%t) Counter was %d\n", count));
23 #endif /* 0 */
24 if(simulate_crashes_ && count == 0)
26 ACE_DEBUG((LM_DEBUG, "Aborting!\n"));
27 ACE_Time_Value tv(5, 0);
28 ACE_OS::sleep(tv);
29 ACE_OS::abort();