
15 Dec
2005
15 Dec
'05
7:31 p.m.
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