19 #ifndef _SERVER_IO_SERVICE_POOL_HPP
20 #define _SERVER_IO_SERVICE_POOL_HPP
24 #include <boost/asio.hpp>
25 #include <boost/bind.hpp>
26 #include <boost/noncopyable.hpp>
27 #include <boost/shared_ptr.hpp>
28 #include <boost/thread/thread.hpp>
41 typedef boost::shared_ptr<boost::asio::io_service> io_service_ptr;
42 typedef boost::shared_ptr<boost::asio::io_service::work> work_ptr;
44 std::vector<io_service_ptr> io_services_;
45 std::vector<work_ptr> work_;
46 std::size_t next_io_service_;
Definition: io_service_pool.hpp:32
void run()
Construct the io_service pool.
Definition: io_service_pool.cpp:40
boost::asio::io_service & get_io_service()
Stop all io_service objects in the pool.
Definition: io_service_pool.cpp:65
void stop()
Run all io_service objects in the pool.
Definition: io_service_pool.cpp:56
IoServicePool(std::size_t pool_size)
Definition: io_service_pool.cpp:24