discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRunLoop limitations


From: Kaelin Colclasure
Subject: Re: NSRunLoop limitations
Date: Wed, 23 Jan 2002 10:11:59 -0800
User-agent: Microsoft-Entourage/10.0.0.1309

On 1/23/02 1:28 AM, "Richard Frith-Macdonald" <richard@brainstorm.co.uk>
wrote:
[snip]
> The use of select() is a historical limitation ... yes the base library
> really *has* been around so long that when it was written a lot of
> systems
> didn't have poll().
> 
> I've never found it to be a real difficulty - as the default set size
> under
> GNU/Linux is 1024 and I've never needed more than that many descriptors,
> but I know it can be a problem occasionally and it would be nice to have
> a poll() implementation.

My test clients need ~10000 descriptors. I have worked on a couple of
different production servers that needed ~12000 or more. [Although beyond
that point you start running into buffer starvation in the networking layer
or TCP stack when too many clients happen to submit a request at the same
instant.]

> We could use 'if HAVE_POLL'  to control fallback to select() in case
> there
> are still select only operating systems in use.

I might have contended the necessity of this earlier this morning... But I
just read on a Mac OS X list that the Darwin guys opted not to implement
poll! Sheesh...

Of course this is the right thing.

> The work of implementing a poll() solution is really almost trivial - it
> would require a new implementation of a single method
> -acceptInputForMode:beforeDate:
> or some conditional compilation within that method, but I think a
> separate
> version of the whole method might be more readable.

I agree.

> I can't imagine how your solution 1 could be even close to being as
> simple as solution 2, since what you are really talking about in 1 is
> rewriting
> the entire class, but in 2 you would just rewrite one method.

So I take it that if I submit a patch for this, you're not averse to
reviewing it for inclusion in the tree? Excellent. That's what I'll do. :-)

-- Kaelin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]