|
Boost Users : |
Subject: Re: [Boost-users] [boost-users][asio] timeout-isio_service.reset()safe with pool of threads?
From: Igor R (boost.lists_at_[hidden])
Date: 2009-02-03 06:29:04
>
> but I don't know for what there is pool of threads in "http server 3"
> example. there is only one scheduled task - async_accept. So, in my
> opinion only one thread will be doing whole job.
First of all, there're more tasks: pay attention that before issuing new
async_accept, the Server calls connection->open(), which in turn issues
async_read etc - all this is processed by one single io_service...
But anyway - what if you've got 1000 incoming connections simultaniously? If
you'd got 1 thread, it would accept them one by one, processing in the
meanwhile read/write operations of the Connection object.
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