Boost Users :
From: Jose Martinez (jmartine_1026_at_[hidden])
Date: 2008-05-24 12:41:23
Thanks a lot. I figured they must be a way to do it; that work class slipped by me unnoticed on the reference page. It seems like they thought of everything.
> 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:
Look at the following example for details:
"survival first, then happiness as we can manage it"
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