mirror of https://github.com/Icinga/icinga2.git
Remove redundant ThreadPool#m_Threads
This commit is contained in:
parent
288ad68649
commit
c953ba1206
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
ThreadPool::ThreadPool()
|
ThreadPool::ThreadPool() : m_Pending(0)
|
||||||
: m_Threads(Configuration::Concurrency * 2u), m_Pending(0)
|
|
||||||
{
|
{
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
|
@ -21,7 +20,7 @@ void ThreadPool::Start()
|
||||||
boost::unique_lock<decltype(m_Mutex)> lock (m_Mutex);
|
boost::unique_lock<decltype(m_Mutex)> lock (m_Mutex);
|
||||||
|
|
||||||
if (!m_Pool) {
|
if (!m_Pool) {
|
||||||
m_Pool = decltype(m_Pool)(new boost::asio::thread_pool(m_Threads));
|
m_Pool = decltype(m_Pool)(new boost::asio::thread_pool(Configuration::Concurrency * 2u));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,6 @@ public:
|
||||||
private:
|
private:
|
||||||
boost::shared_mutex m_Mutex;
|
boost::shared_mutex m_Mutex;
|
||||||
std::unique_ptr<boost::asio::thread_pool> m_Pool;
|
std::unique_ptr<boost::asio::thread_pool> m_Pool;
|
||||||
size_t m_Threads;
|
|
||||||
Atomic<uint_fast64_t> m_Pending;
|
Atomic<uint_fast64_t> m_Pending;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue