Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_1551_Regression / Hello.cpp
blob2885a6c62ff4d2754f4c3ffb18e08096fff4a6fc
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 (void)
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();