discuss-gnustep
[Top][All Lists]
Advanced

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

Re: nsrunloop is not using select?


From: Rogelio Serrano
Subject: Re: nsrunloop is not using select?
Date: Tue, 23 Jan 2007 15:55:46 +0800

On 1/23/07, Richard Frith-Macdonald <richard@tiptree.demon.co.uk> wrote:

On 23 Jan 2007, at 07:11, Rogelio Serrano wrote:

> Why is nsrunloop not using select?

It uses the best mechanism for the platform you are running on ...
win32 uses waitformultipleobjects
most unixes will use poll() because of better performance and
scalability than select
where poll() is not available or is less efficient than select(), it
will use select()


whats the best for linux?

> And how does nsconnection work with nsrunloop?

That's too big a discussion for an email, but the very short answer
is that it adds ports to the runloop and handles messages arriving on
those ports. For more detail you should go to the documentation of
the classes.


i just skimmed the sources. so nsonnection is the delegate for nsport.
is that correct?

> And how does multithreaded nsconnections fit in an nsrunloop?

A multithreaded connection is one where the same port is added to the
runloops of multiple threads.  The thread safety issues make it less
efficient than single threaded connections.



wow its a little hard to wrap my little brain around that but i think
i have a use for that.

so is this is different from running a connection in a different thread then.


--
the thing i like with my linux pc is that i can sum up my complaints in 5 items




reply via email to

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