Re: [HACKERS] [PATCHES] fork/exec patch

Lists: Postg토토SQL : Postg토토SQL
From: "Steve Tibbett" <stibbett(at)zim(dot)biz>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCHES] fork/exec patch
Date: 2003-12-16 20:06:28
Message-ID: 546CD3100F4C0F42A30A94C0F2B349148FC64A@zimmail1.zim.zimismobile.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg토토SQL : Postg토토SQL

>Isn't WaitForSingleObject() in effect a polling call?

It puts your thread to sleep, until it gets woken up by the handle
you're waiting on being set to a signalled state.

--
Steve Tibbett
stibbett(at)zim(dot)biz


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCHES] fork/exec patch
Date: 2003-12-16 20:20:38
Message-ID: 3FDF6916.8020901@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg토토 베이SQL : Postg토토

Steve Tibbett wrote:

>>Isn't WaitForSingleObject() in effect a polling call?
>>
>>
>
>It puts your thread to sleep, until it gets woken up by the handle
>you're waiting on being set to a signalled state.
>
>
>

Right. Just like select() puts your thread to sleep until one of its
files is ready (or it times out).

Do we have a terminology problem here?

The point is that, unlike classic Unix signal programming, you need
*something* that explicitly checks for the event. It could be a separate
thread in a tight loop, which is what the CONNX code appears to do, or
it could conceivably be something else in the main thread with a very
short timeout.

cheers

andrew