My question is about boost asio's io_service. When i call it with that method :
int main()
{
try
{
boost::asio::io_service io_service;
Server server(io_service);
std::vector<boost::shared_ptr<boost::thread> > threads;
for (std::size_t i = 0; i < 16; ++i)
{
boost::shared_ptr<boost::thread> thread(new boost::thread(boost::bind(&boost::asio::io_service::run, &io_service)));
threads.push_back(thread);
}
for (std::size_t i = 0; i < threads.size(); ++i)
threads[i]->join();
}
catch (std::exception& e)
{
std::cerr << e.what() << std::endl;
}
return 0;
}
Will it share threads for requests dynamically, or it will be only give only one thread for connection groups ? Thanks.