From: Thore Karlsen (sid_at_[hidden])
Date: 2005-12-15 15:23:34
On Thu, 15 Dec 2005 15:03:48 -0500, Jody Hagins
>> You seem to be reading this differently than I am. To me it looks like
>> he's saying that he has one thread that accepts connections, and then
>> he passes the socket to a worker thread where he does all the
>> synchronous reading and writing to service the client.
>> He may have the threads already standing by when he accepts new
>> connections, but since he's doing synchronous I/O he can't service
>> more than one connection at a time from a thread. Thus the number of
>> connections he can handle is limited by the number of threads he has,
>> which is why there's a scalability problem.
>You do not understand. This is a typical technique for thread pools.
>Each thread only performs the task requested, and the next task may be
>on a totally different connection.
And how do you presume that Arkadiy is doing that when he's doing all
synchronous communication in the worker threads? How can one of his
threads service another connection when it's blocked waiting for data
from the client, or blocked sending data to a client?
If he is truly servicing multiple connections from a single thread using
blocking I/O I'd love to know how he's doing it.
-- Be seeing you.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk