Boost logo

Boost :

From: Chris Richards (chris.richards_at_[hidden])
Date: 2006-11-08 10:48:07

 I have implemented a simple tcp server using asio. I wish to be able to
dynamically add and remove threads from the io_service thread pool, so that
when the server is heavily loaded it can be given more threads to cope with
the load, but when the load reduces it can release the threads back to the OS.

I've tried posting to the io_service a handler which just throws an exception
so that the thread exits, but it also resets the tcp connection and causes the
acceptor thread to exit as well.

Is there a way of cleanly stopping just a single io_service::run method which
would then cause the thread to exit?

Boost list run by bdawes at, gregod at, cpdaniel at, john at