From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2007-05-03 19:11:03
On Thu, 3 May 2007 17:29:27 +0530, Gaurav.Jain_at_[hidden] said:
> 1. I want to create ioservice object as per the no of CPU I have,
> so that I can distribute the load evenly.
> 2. How to create a list of ioservice object & make them running all
> the time even when there is no request to process.
See the example I referred to in my other reply.
> What's the definition
> of idle ioservice in this case... the one which is this the one which is
> not handling any connection? How can I choose a ioservice out of a pool
> of idle service whenever a new request comes from the client.
> 3. Can I restrict no of clients(connections) on each io service,
> lets say 500 connection on each ioservice or so ?
These aspects are entirely up to you. Just design your "load-balancing"
scheme (the io_service_pool::get_io_service() function in the example)
so that it won't create a new connection on an io_service unless the
load for the io_service meets your criteria.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk