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

Поиск
Список
Период
Сортировка
От Markus Wanner
Тема Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)
Дата
Msg-id 4C8523EB.7070301@bluegap.ch
обсуждение исходный текст
Ответ на Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Hi,

On 09/06/2010 06:27 PM, Heikki Linnakangas wrote:
> Here's an updated patch, with all the issues reported this far fixed,
> except for that naming issue, and Fujii's suggestion to use poll()
> instead of select() where available. I've also polished it quite a bit,
> improving comments etc. Magnus, can you take a look at the Windows
> implementation to check that it's sane? At least it seems to work.

Is pselect() really as unportable as stated in the patch? What platforms 
have problems with pselect()?

Using the self-pipe trick, don't we risk running into the open file 
handles limitation? Or is it just two handles per process?

Do I understand correctly that the purpose of this patch is to work 
around the brokenness of select() on very few platforms? Or is there any 
additional feature that plain signals don't give us?

> + * It's important to reset the latch*before*  checking if there's work to
> + * do. Otherwise, if someone sets the latch between the check and the
> + * ResetLatch call, you will miss it and Wait will block.

Why doesn't WaitLatch() clear it? What's the use case for waiting for a 
latch and *not* wanting to reset it?

Regards

Markus


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: 9.1alpha1 bundled -- please verify