Re: [boost] Asio multithreaded http server

berserker_r <berserker_r@hotmail.com> wrote:
Asio samples lacks a multithreaded server implementation: where can I find an example/tutorial about that?
There isn't one included yet in Boost.Asio, but you can have a look at these programs: http://asio.cvs.sourceforge.net/asio/asio/src/tests/performance/
It's a bit hard to say what might be wrong without knowing some more details. Can you post a small bit of code or pseudocode showing how the session and acceptor work? Thanks. Cheers, Chris

http://asio.cvs.sourceforge.net/asio/asio/src/tests/performance/
I had a look at that sample, but I fall in the same problem... Btw let's take "server.cpp" as sample and suppose that "session::handle_read" takes a very long time to generate the response: how can I change the server code in order to be free to accept new connections in the meanwhile? Actually the server looks to be "locked" to accept new connections until the current session has finished its work even calling io_service::run from multiple threads. Thanks
participants (2)
-
berserker_r
-
Christopher Kohlhoff