[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patches for poll-based NSRunLoop
From: |
Richard Frith-Macdonald |
Subject: |
Re: Patches for poll-based NSRunLoop |
Date: |
Sat, 26 Jan 2002 17:52:27 +0000 |
On Saturday, January 26, 2002, at 05:21 PM, Jonathan B. Leffert wrote:
On Sat, Jan 26, 2002 at 10:17:28AM +0000, Richard Frith-Macdonald wrote:
I think I said 'almost trivial' - but that's from the point of view
of someone who has been writing unix comms related software since
before
either select() or poll() existed (around 20 years), and is very
familiar
with NSRunLoop ... so I guess 'straightforward' may be more
appropriate.
Please forgive, then, what is probably a naive question. What is the
purpose of this patch? Does poll generally scale better than select or
is
it that poll has a more straightforward api?
Yes - it scales more easily for vast numbers of file descriptors, both
because it's less trouble to build and more importantly, select depends
on the size of a bitmask which is fixed at compile time, while the size
of the array of structures used by poll is normally determined at
runtime.
Probably for 99.??% of users this is not an issue - but it obviously is
for at least one person - and it's good to use the best possible
implementation.