Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2005-12-15 14:31:51


Thore Karlsen wrote:

>>>How are you reading and writing from multiple sockets simultaneously in
>>>your main thread?
>
>
>>I was not. I was reading/writig from the worker threads. The main thread
>>was used only to accept connections.
>
>
> So in that case you are handling one connection per thread, which does
> not scale well.

I'm sorry, but your conclusion seems wrong. If a dispatcher thread
puts requests into a queue for worker threads to consume, it's most
definitely *not* a thread-per-connection design, but a thread pool.

It would be a thread-per-connection if threads were created
as a result of new connection requests being put into the queue. But
that he (apparently) isn't doing.

Regards,
                Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk