22 #include <boost/asio.hpp> 41 const unsigned threadsNumber = GetThreadsNumber(params);
44 for (
unsigned i = 0; i < threadsNumber; ++i)
46 Threads.emplace_back([
this, i]()
60 std::for_each(Threads.begin(), Threads.end(), [](std::thread & thread)
66 virtual boost::asio::io_service &
GetIoService()
override 77 if (paramIt.Name ==
"threads")
79 num = std::stoi(paramIt.Value);
88 boost::asio::io_service IoService;
89 boost::asio::io_service::work Work;
90 std::vector<std::thread> Threads;
102 return Common::Addon::UniquePtr(
new AsioAddonImpl);
Common::Addon * CreateAddon()
Addon interface definition GNU LGPL.
virtual void Stop()=0
Stopping addon work. After calling this method addon should throw exception on any calls...
virtual void Initialize(AddonsManager &manager, const AddonParameters ¶meters)=0
initialize addon.
OPC UA Address space part. GNU LGPL.
virtual boost::asio::io_service & GetIoService()=0
std::vector< Parameter > Parameters