select() for small sleep - Mailing list pgsql-hackers

From Andrew Dunstan
Subject select() for small sleep
Date
Msg-id 3FF19BC0.5050904@dunslane.net
Whole thread Raw
Responses Re: select() for small sleep
List 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 by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: [PATCHES] update i386 spinlock for hyperthreading
Next
From: Tom Lane
Date:
Subject: Re: Concurrence GiST