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

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:48:14
Message-ID: 546CD3100F4C0F42A30A94C0F2B349148FC666@zimmail1.zim.zimismobile.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)zim(dot)biz

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Merlin Moncure 2003-12-16 21:04:07 Re: [HACKERS] [PATCHES] fork/exec patch
Previous Message Magnus Hagander 2003-12-16 20:35:26 Re: [HACKERS] [PATCHES] fork/exec patch