select() for small sleep

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема select() for small sleep
Дата
Msg-id 3FF19BC0.5050904@dunslane.net
обсуждение исходный текст
Ответы Re: select() for small sleep  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:

>
>  There are a couple of other places where [select()] is used for small 
> sleeps (storage/lmgr/s_lock.c and access/transam/xact.c) - those 
> should possibly be abstracted out (Windows doesn't behave well there 
> anyway, I believe - with 0 FDs I read somewhere it returns immediately 
> regardless of the timeout setting).
>

What is the preferred way to handle these 2 cases?  We could handle them 
with #ifdef'd code inline, or create a new function pg_usleep(), or 
possibly handle it with conditional macros inline. If a new function or 
macro, where should they go?

cheers

andrew



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

Предыдущее
От: Manfred Spraul
Дата:
Сообщение: Re: [PATCHES] update i386 spinlock for hyperthreading
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Concurrence GiST