MCPcopy Create free account
hub / github.com/Icinga/icinga2 / WorkQueue

Method WorkQueue

lib/base/workqueue.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16boost::thread_specific_ptr<WorkQueue *> l_ThreadWorkQueue;
17
18WorkQueue::WorkQueue(size_t maxItems, int threadCount, LogSeverity statsLogLevel)
19 : m_ID(m_NextID++), m_ThreadCount(threadCount), m_MaxItems(maxItems),
20 m_StatsLogLevel(statsLogLevel), m_TaskStats(15 * 60)
21{
22 /* Initialize logger. */
23 m_StatusTimerTimeout = Utility::GetTime();
24
25 m_StatusTimer = Timer::Create();
26 m_StatusTimer->SetInterval(10);
27 m_StatusTimer->OnTimerExpired.connect([this](const Timer * const&) { StatusTimerHandler(); });
28 m_StatusTimer->Start();
29}
30
31WorkQueue::~WorkQueue()
32{

Callers

nothing calls this directly

Calls 2

SetIntervalMethod · 0.80
StartMethod · 0.45

Tested by

no test coverage detected