OpenDDS
Snapshot(2023/04/28-20:55)
|
#include <ThreadStatusManager.h>
Classes | |
class | Event |
class | Sleeper |
class | Start |
class | Thread |
Public Types | |
typedef String | ThreadId |
Public Member Functions | |
typedef | OPENDDS_MAP (ThreadId, Thread) Map |
typedef | OPENDDS_LIST (Thread) List |
void | thread_status_interval (const TimeDuration &thread_status_interval) |
const TimeDuration & | thread_status_interval () const |
bool | update_thread_status () const |
void | harvest (const MonotonicTimePoint &start, List &running, List &finished) const |
Private Member Functions | |
void | add_thread (const String &name) |
void | active (bool nested=false) |
void | idle (bool nested=false) |
void | finished () |
void | cleanup (const MonotonicTimePoint &now) |
Static Private Member Functions | |
static ThreadId | get_thread_id () |
Private Attributes | |
TimeDuration | thread_status_interval_ |
TimeDuration | bucket_limit_ |
Map | map_ |
List | list_ |
ACE_Thread_Mutex | lock_ |
Definition at line 19 of file ThreadStatusManager.h.
Definition at line 29 of file ThreadStatusManager.h.
|
private |
Definition at line 117 of file ThreadStatusManager.cpp.
References ACE_GUARD, bucket_limit_, cleanup(), get_thread_id(), lock_, map_, OpenDDS::DCPS::TimePoint_T< SystemClock >::now(), OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now(), OpenDDS::DCPS::ThreadStatusManager::Thread::ThreadStatus_Active, and update_thread_status().
|
private |
Definition at line 94 of file ThreadStatusManager.cpp.
References ACE_DEBUG, ACE_GUARD, OpenDDS::DCPS::ThreadStatusManager::Thread::bit_key(), OpenDDS::DCPS::DCPS_debug_level, get_thread_id(), LM_DEBUG, lock_, map_, OpenDDS::DCPS::ThreadStatusManager::Thread::Thread(), OpenDDS::DCPS::to_dds_string(), and update_thread_status().
|
private |
Definition at line 199 of file ThreadStatusManager.cpp.
References list_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, and thread_status_interval_.
Referenced by active(), finished(), and idle().
|
private |
Definition at line 157 of file ThreadStatusManager.cpp.
References ACE_GUARD, bucket_limit_, cleanup(), get_thread_id(), list_, lock_, map_, OpenDDS::DCPS::TimePoint_T< SystemClock >::now(), OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now(), OpenDDS::DCPS::ThreadStatusManager::Thread::ThreadStatus_Idle, and update_thread_status().
|
staticprivate |
Definition at line 79 of file ThreadStatusManager.cpp.
References ACE_Thread::self(), ACE_OS::thr_gettid(), and ACE_OS::thr_id().
Referenced by active(), add_thread(), finished(), and idle().
void OpenDDS::DCPS::ThreadStatusManager::harvest | ( | const MonotonicTimePoint & | start, |
List & | running, | ||
List & | finished | ||
) | const |
Copy active and idle threads to running and finished threads to finished. Only threads updated after start are considered.
Definition at line 180 of file ThreadStatusManager.cpp.
References ACE_GUARD, list_, lock_, and map_.
|
private |
Definition at line 137 of file ThreadStatusManager.cpp.
References ACE_GUARD, bucket_limit_, cleanup(), get_thread_id(), lock_, map_, OpenDDS::DCPS::TimePoint_T< SystemClock >::now(), OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now(), OpenDDS::DCPS::ThreadStatusManager::Thread::ThreadStatus_Idle, and update_thread_status().
typedef OpenDDS::DCPS::ThreadStatusManager::OPENDDS_LIST | ( | Thread | ) |
|
inline |
Definition at line 80 of file ThreadStatusManager.h.
Referenced by OpenDDS::RTPS::Spdp::SpdpTransport::enable_periodic_tasks(), OpenDDS::DCPS::Service_Participant::load_common_configuration(), OpenDDS::DCPS::Service_Participant::parse_args(), OpenDDS::DCPS::DcpsUpcalls::svc(), OpenDDS::DCPS::ReactorTask::svc(), and OpenDDS::DCPS::QueueTaskBase< DataLink_rch >::svc().
|
inline |
Definition at line 86 of file ThreadStatusManager.h.
|
inline |
Definition at line 91 of file ThreadStatusManager.h.
References OpenDDS::DCPS::TimeDuration::zero_value.
Referenced by active(), add_thread(), OpenDDS::RTPS::Spdp::SpdpTransport::enable_periodic_tasks(), finished(), idle(), OpenDDS::DCPS::DcpsUpcalls::svc(), OpenDDS::DCPS::ReactorTask::svc(), and OpenDDS::DCPS::QueueTaskBase< DataLink_rch >::svc().
|
private |
Definition at line 173 of file ThreadStatusManager.h.
Referenced by active(), finished(), and idle().
|
private |
Definition at line 175 of file ThreadStatusManager.h.
Referenced by cleanup(), finished(), and harvest().
|
mutableprivate |
Definition at line 177 of file ThreadStatusManager.h.
Referenced by active(), add_thread(), finished(), harvest(), and idle().
|
private |
Definition at line 174 of file ThreadStatusManager.h.
Referenced by active(), add_thread(), finished(), harvest(), and idle().
|
private |
Definition at line 172 of file ThreadStatusManager.h.
Referenced by cleanup().