discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSRunLoop limitations


From: Stephen Brandon
Subject: Re: NSRunLoop limitations
Date: Wed, 23 Jan 2002 10:07:05 +0000

On Wednesday 23 Jan 2002 9:29 am, Richard wrote:

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

We ran across a problem the other day with an external library using poll, 
that did not work on MacOSX - we changed to select and that was ok.

Now I don't imagine anyone will be using GNUstep's runloop atop MacOSX... or 
maybe someone is... but there must be other systems around with the same 
limitation.

> 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.
> We could use 'if HAVE_POLL'  to control fallback to select() in case
> there
> are still select only operating systems in use.

Yes, great idea. It certainly is pretty trivial to implement.

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

Stephen Brandon



reply via email to

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