27#include <condition_variable>
47 Thread(
const char *
name,
const char *instr_name,
const char *os_name,
Definition: health_monitor_thread.h:44
const char * name() const
Definition: health_monitor_thread.h:51
static void cleanup()
Cleanup thread instrumentation.
Definition: health_monitor_thread.cc:90
virtual void process()
Definition: health_monitor_thread.h:70
virtual int start()
Definition: health_monitor_thread.cc:53
const std::string m_instr_name
Definition: health_monitor_thread.h:77
PSI_thread_key m_thread_key
Definition: health_monitor_thread.h:84
PSI_cond_key m_cond_key
Definition: health_monitor_thread.h:99
virtual void pre_process()
Definition: health_monitor_thread.h:69
static int join(my_thread_handle *thread, void **value_ptr)
Definition: health_monitor_thread.cc:97
my_thread_handle m_thread
Definition: health_monitor_thread.h:83
virtual ~Thread()=0
Definition: health_monitor_thread.cc:47
const std::string m_description
Definition: health_monitor_thread.h:79
bool stop_requested()
Return true when worker shutdown has been requested.
Definition: health_monitor_thread.cc:160
void request_thread_stop()
Request that the worker stop without waiting for it to exit.
Definition: health_monitor_thread.cc:141
const std::string m_name
Definition: health_monitor_thread.h:76
void join_thread()
Wait for a stopped worker to exit.
Definition: health_monitor_thread.cc:151
virtual void post_process()
Definition: health_monitor_thread.h:71
void signal()
Signal the processing loop to end the current cycle.
Definition: health_monitor_thread.cc:95
const std::string m_os_name
Definition: health_monitor_thread.h:78
virtual void stop()
Definition: health_monitor_thread.cc:58
std::atomic< bool > m_thread_running
Definition: health_monitor_thread.h:80
PSI_mutex_key m_mutex_key
Definition: health_monitor_thread.h:94
PSI_cond_info m_cond_info
Definition: health_monitor_thread.h:100
virtual bool running() const
Definition: health_monitor_thread.h:52
PSI_mutex_info m_mutex_info
Definition: health_monitor_thread.h:95
int start_thread()
Definition: health_monitor_thread.cc:117
std::mutex m_command_lock
Definition: health_monitor_thread.h:74
bool m_stop
Definition: health_monitor_thread.h:81
mysql_mutex_t m_wait_lock
Definition: health_monitor_thread.h:93
static bool joinable(const my_thread_handle &thread)
Definition: health_monitor_thread.cc:101
PSI_thread_info m_thread_info
Definition: health_monitor_thread.h:85
virtual void run_process()
Main thread loop.
Definition: health_monitor_thread.cc:66
void stop_thread()
Definition: health_monitor_thread.cc:134
mysql_cond_t m_wait
Definition: health_monitor_thread.h:98
#define PSI_DOCUMENT_ME
Definition: component_common.h:29
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:35
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:44
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:52
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:50
#define PSI_VOLATILITY_PROVISIONING
Definition: psi_bits.h:155
#define PSI_FLAG_THREAD_SYSTEM
System thread flag.
Definition: psi_bits.h:124
Definition: component_command.h:29
Condition information.
Definition: psi_cond_bits.h:88
Mutex information.
Definition: psi_mutex_bits.h:73
Thread instrument information.
Definition: psi_thread_bits.h:117
Definition: my_thread_bits.h:58
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50