Date: Fri, 2 Jul 1999 23:27:34 -0500 (CDT) From: Jonathan Lemon <jlemon@americantv.com> To: wayne@crb-web.com, hackers@freebsd.org Subject: Re: poll() vs select() Message-ID: <199907030427.XAA17423@free.pcs> In-Reply-To: <local.mail.freebsd-hackers/Pine.LNX.3.95.990702160538.27513C-100000@crb.crb-web.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-hackers/Pine.LNX.3.95.990702160538.27513C-100000@crb.crb-web.com> you write: >now supports the select() and poll() system calls. My question is really one >of usage. Why would one us poll() over select()? Is select eventually going >to go away for some reason? select() as a user-level call will never go away; there is a large base of code that uses it. poll() is faster (it doesn't have to do bit twiddling), and it's interface is cleaner (it can report invalid fd's, something select() can't do). As its functionality is a superset of select()'s, it is used as the internal implementation for select(). As for new code, use whichever you are comfortable with. Personally, I would recommend poll(), since it provides some added functionality over select() that makes for easier programming. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907030427.XAA17423>