Re: [HACKERS] [PATCHES] fork/exec patch - Mailing list pgsql-hackers-win32

From Steve Tibbett
Subject Re: [HACKERS] [PATCHES] fork/exec patch
Date
Msg-id 546CD3100F4C0F42A30A94C0F2B349148FC666@zimmail1.zim.zimismobile.com
Whole thread Raw
List pgsql-hackers-win32
>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?

Ah I see what you're saying, the polling isn't the WaitForSingleObject,
it's that the main thread that's going to have to poll something to see
if the thread that's doing the WaitForSingleObject has woken up and set
a signal or something.

WaitForSingleObject itself isn't polling the same way select() isn't
polling..

Anyway, this article has an interesting twist on the issue:

http://www.codeproject.com/threads/queueuserapcex.asp

It uses a driver to set a thread into an alertable state, so that an APC
sent with QueueUserAPC() can be delivered any time.  It's kinda messy
that it has to use a driver to get the job done but OTOH it gives you
signals that work pretty similarly to what you get with Unix I believe.

--
Steve Tibbett
stibbett@zim.biz


pgsql-hackers-win32 by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: [HACKERS] [PATCHES] fork/exec patch
Next
From: "Merlin Moncure"
Date:
Subject: Re: [HACKERS] [PATCHES] fork/exec patch