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