Re: Threads question

Eric.Schenk@dna.lth.se
Sat, 26 Apr 1997 00:58:41 +0200


Todd Graham Lewis <lists@reflections.eng.mindspring.net> writes:
>A combo (clone<->lib) threading approach lets you do these sorts of things
>easily. Telling the IRC designers "You shouldn't support more than 1000
>connections per server" is kind of unrealistic, isn't it?

I see nothing about IRC that would make it work better with a single
thread per connection. It's just a little easier to program that way.
As far as I can tell IRC servers just need to be a big event dispatch loop,
and all of the events can be dispatched without blocking on anything.
If blocking is a problem you still shouldn't need a thread per connection
to deal with it, you just have to code to retry blocked events next
time around the dispatch loop.

[Admission: I've never actually used IRC, so I might be talking out
of the side of my mouth on this one.]

-- 
Eric Schenk                               www: http://www.dna.lth.se/~erics
Dept. of Comp. Sci., Lund University          email: Eric.Schenk@dna.lth.se
Box 118, S-221 00 LUND, Sweden   fax: +46-46 13 10 21  ph: +46-46 222 96 38