28 #ifndef __TERRALIB_COMMON_INTERNAL_THREADGROUP_H 29 #define __TERRALIB_COMMON_INTERNAL_THREADGROUP_H 35 #include <boost/thread.hpp> 36 #include <boost/asio/io_service.hpp> 55 ThreadGroup(std::size_t numberOfThreads = std::string::npos);
61 template <
typename Function>
62 void addJob(Function func);
71 std::unique_ptr<boost::asio::io_service::work>
m_work;
75 template <
typename Function>
84 #endif // __TERRALIB_COMMON_INTERNAL_THREADGROUP_H This class represents a thread group.
Configuration flags for the TerraLib Common Runtime module.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.
void addJob(Function func)
Waits for all threads to finish their jobs.
std::unique_ptr< boost::asio::io_service > m_ioService
Boost IO service.
std::unique_ptr< boost::thread_group > m_threadGroup
Boost thread group.
std::unique_ptr< boost::asio::io_service::work > m_work
Boost work.