MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / wait_for_thread_status_interval

Function wait_for_thread_status_interval

tests/DCPS/ThreadStatusManager/main.cpp:109–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107};
108
109bool wait_for_thread_status_interval(const TimeDuration& expected)
110{
111 const MonotonicTimePoint deadline = MonotonicTimePoint::now() + TimeDuration(config_wait_time);
112 while (MonotonicTimePoint::now() < deadline) {
113 if (TheServiceParticipant->get_thread_status_manager().thread_status_interval() == expected) {
114 return true;
115 }
116 ACE_OS::sleep(config_poll_interval);
117 }
118 ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: wait_for_thread_status_interval - timed out waiting for interval to become {%d sec, %u nsec}\n",
119 expected.value().sec(), expected.value().usec() * 1000u));
120 return false;
121}
122
123bool read_status(DDS::WaitSet_var ws, InternalThreadBuiltinTopicDataDataReader_var dr, MonotonicTimePoint& timestamp,
124 TestThread& task, TestThread::TestThreadState new_state, const char* status,

Callers 1

ACE_TMAINFunction · 0.85

Calls 2

valueMethod · 0.45

Tested by

no test coverage detected