[Home] [Groups] - Message: [Prev in Group] [Next in Group]
6862: [MUD-Dev] Re: [CODE] [LANGUAGE/PLATFORM SPECIFIC] My Event Engine
[Full Header] [Plain Text]
From: Chris Gray <cg@ami-cg.GraySage.Edmonton.AB.CA>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 11 Aug 1998 21:23:07 -0600
Organization: Kanga.Nu
[J C Lawrence:]
[>> is me]
>> I didn't quite follow all of that, but I'll ask this question: where
>> does your server spend its time waiting if it has nothing to do?
>> Mine spends its time in a single 'select' call, which contains the
>> fd-bits for the main connection socket, and all client sockets. I'm
>> not multi-threaded, so that is easy for me to do.
>
>Did you note the performance concerns of select() vs poll() at:
>
> http://www.kanga.nu/~petidomo/lists/mud-dev/1998Q2/msg01208.html
Yep, I followed that information. I've used 'poll' at work (on Solaris,
I think it was). The problem is that Linux doesn't seem to support 'poll'.
Grrr.
The bright side is that using 'poll' doesn't really help unless you
are multithreaded (which I'm not), since you always have to wait for
input from any of your open client sockets. Since UNIX/Linux re-uses
fd numbers, they will tend to cluster towards the small end of the
values, and hence just keeping track of the maximum one works out not
too badly.