Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Wanner <markus@bluegap.ch>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Fujii Masao <masao.fujii@gmail.com>, pgsql-hackers@postgresql.org, Magnus Hagander <magnus@hagander.net>
Date: 2010-09-06T21:03:38Z
Lists: pgsql-hackers
Markus Wanner <markus@bluegap.ch> writes:
> AFAICT the custom select() implementation we are using for Windows could 
> easily be changed to mimic pselect() instead. Thus most reasonably 
> up-to-date Linux distributions plus Windows certainly provide a workable 
> pselect() syscall. Would it be worth using pselect() for those (and 
> maybe others that support pselect() appropriately)?

I don't entirely see the point of opening ourselves up to the risk of
using a pselect that's not safe under the hood.  In any case, on most
modern platforms poll() is preferable to any variant of select().

			regards, tom lane