Re: Linus on Linux, Apache and Threads

Tony Gale (gale@syntax.dera.gov.uk)
Fri, 23 Apr 1999 17:06:23 +0100 (BST)


On 23-Apr-99 Chuck Lever wrote:

>> Depends. You can use a thread pool and queue requests which are
>> then
>> picked up by the threads.
>
> how do you propose to do that efficiently? is there a nice way in
> Unix/Linux to hand out incoming network requests to a pool of
> threads?
>

You have a main thread that does an accept() loop and queues
the connections via the descriptor (possibly starting new threads, *if
required*).

I've already implemented this for a web proxy I've been working on.

-tony

---
E-Mail: Tony Gale <gale@syntax.dera.gov.uk>
Advice is a dangerous gift; be cautious about giving and receiving it.

The views expressed above are entirely those of the writer and do not represent the views, policy or understanding of any other person or official body.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/