1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "base/threadpool.hpp"
4 #include <boost/thread/locks.hpp>
6 using namespace icinga;
8 ThreadPool::ThreadPool(size_t threads)
14 ThreadPool::~ThreadPool()
19 void ThreadPool::Start()
21 boost::unique_lock<decltype(m_Mutex)> lock (m_Mutex);
24 m_Pool = decltype(m_Pool)(new boost::asio::thread_pool(m_Threads));
28 void ThreadPool::Stop()
30 boost::unique_lock<decltype(m_Mutex)> lock (m_Mutex);