Skip site navigation (1) Skip section navigation (2)

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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)
Date: 2010-09-02 18:30:59
Message-ID: 4C7FED63.8040704@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 02/09/10 06:46, Fujii Masao wrote:
> On Wed, Sep 1, 2010 at 4:11 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)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: latch-3.patch
Description: text/x-diff (32.5 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-09-02 19:07:40
Subject: Re: "serializable" in comments and names
Previous:From: Kevin GrittnerDate: 2010-09-02 18:23:37
Subject: Re: "serializable" in comments and names

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group