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

From Heikki Linnakangas
Subject Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)
Date
Msg-id 4C7FED63.8040704@enterprisedb.com
Whole thread Raw
In response to Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 02/09/10 06:46, Fujii Masao wrote:
> On Wed, Sep 1, 2010 at 4:11 PM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com>  wrote:
>> The obvious next question is how to wait for multiple sockets and a latch at
>> the same time? Perhaps we should have a select()-like interface where you
>> can pass multiple file descriptors. Then again, looking at the current
>> callers of select() in the backend, apart from postmaster they all wait for
>> only one fd.
>
> Currently backends have not waited for multiple sockets, so I don't think that
> interface is required for now. Similarly, we don't need to wait for the socket
> to be ready to *write* because there is no use case for now.

Ok, here's an updated patch with WaitLatchOrSocket that let's you do that.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: "serializable" in comments and names
Next
From: Tom Lane
Date:
Subject: Re: "serializable" in comments and names