|
Boost Users : |
From: Igor R (boost.lists_at_[hidden])
Date: 2008-05-24 05:23:08
> My question is how do I keep the thread's io_service.run() from returning right away, since there will be no work for the io_service.run() to do until the server lines up a new connection for the thread to handle?
Use asio::io_service::work class:
http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/io_service__work.html
Look at the following example for details:
http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/example/http/server2/io_service_pool.cpp
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net