mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
25998e9ad8
commit
4ce0f1e7bb
@ -23,6 +23,7 @@
|
||||
#include "db_ido_mysql/idomysqlconnection.th"
|
||||
#include "base/array.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/workqueue.h"
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
namespace icinga
|
||||
@ -53,6 +54,8 @@ private:
|
||||
DbReference m_InstanceID;
|
||||
DbReference m_LastNotificationID;
|
||||
|
||||
WorkQueue m_QueryQueue;
|
||||
|
||||
boost::mutex m_ConnectionMutex;
|
||||
bool m_Connected;
|
||||
MYSQL m_Connection;
|
||||
|
@ -68,6 +68,11 @@ void WorkQueue::Join(void)
|
||||
m_CV.wait(lock);
|
||||
}
|
||||
|
||||
boost::thread::id WorkQueue::GetThreadId(void) const
|
||||
{
|
||||
return m_Thread.get_id();
|
||||
}
|
||||
|
||||
void WorkQueue::WorkerThreadProc(void)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_Mutex);
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
void Enqueue(const WorkCallback& item);
|
||||
void Join(void);
|
||||
|
||||
boost::thread::id GetThreadId(void) const;
|
||||
|
||||
private:
|
||||
int m_ID;
|
||||
static int m_NextID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user