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

Method thread_status_task

dds/DCPS/RTPS/Spdp.cpp:4558–4590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4556
4557#ifndef DDS_HAS_MINIMUM_BIT
4558void Spdp::SpdpTransport::thread_status_task()
4559{
4560 DCPS::RcHandle<Spdp> outer = outer_.lock();
4561 if (!outer) return;
4562
4563 if (DCPS::DCPS_debug_level > 4) {
4564 ACE_DEBUG((LM_DEBUG,
4565 "(%P|%t) Spdp::SpdpTransport::thread_status_task(): Updating internal thread status BIT.\n"));
4566 }
4567
4568 ACE_GUARD(ACE_Thread_Mutex, g, outer->lock_);
4569
4570 typedef DCPS::ThreadStatusManager::List List;
4571 List running;
4572 List removed;
4573 TheServiceParticipant->get_thread_status_manager().harvest(last_thread_status_harvest_, running, removed);
4574 const MonotonicTimePoint now = MonotonicTimePoint::now();
4575 last_thread_status_harvest_ = now;
4576 for (List::const_iterator i = removed.begin(); i != removed.end(); ++i) {
4577 DCPS::InternalThreadBuiltinTopicData data;
4578 data.thread_id = i->bit_key().c_str();
4579 outer->bit_subscriber_->remove_thread_status(data);
4580 }
4581 for (List::const_iterator i = running.begin(); i != running.end(); ++i) {
4582 DCPS::InternalThreadBuiltinTopicData data;
4583 data.thread_id = i->bit_key().c_str();
4584 data.utilization = i->utilization(now);
4585 data.monotonic_timestamp = i->last_update().to_idl_struct();
4586 data.detail1 = i->detail1();
4587 data.detail2 = i->detail2();
4588 outer->bit_subscriber_->add_thread_status(data, DDS::NEW_VIEW_STATE, i->timestamp());
4589 }
4590}
4591#endif
4592
4593#if OPENDDS_CONFIG_SECURITY

Callers

nothing calls this directly

Calls 7

harvestMethod · 0.80
remove_thread_statusMethod · 0.80
utilizationMethod · 0.80
add_thread_statusMethod · 0.80
lockMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected