Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-12-15 16:29:51

On Thu, 15 Dec 2005 14:23:34 -0600
Thore Karlsen <sid_at_[hidden]> wrote:

> 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.

This thread of discussion has gone way past its intent, and I'm not sure
this is the place for discussions on thread pool implementations.
However, just to give you something to think about... Why does the main
thread have to do any I/O at all? One could easily conceive a thread
that looks for work to be done, then sends that work to an available
thread for processing, without ever performing any I/O. Or, a thread
pool that "passes a token" representing the responsibility of finding
work. It finds some work to do, then passes the token to another thread
before actually doing the work.

There are many (some better than others) ways of accomplishing similar
things without having one thread do all the input...

Boost list run by bdawes at, gregod at, cpdaniel at, john at