From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance |
Date: | 2005-10-23 16:00:10 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE92E77D@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Here is the full patch of the timer implemenation with threading safty
> added. Basic test is by several rounds of "make check" and threading
> safty test is by a SQL file with many lines of "set
> statement_timeout =
> x". I don't know if there are any corner cases that I should
> consider, if
> any, let me know.
Here's another version of this patch ;-) I've based it on your patch, so
the changes to ovalue etc should sitill be there.
If we're going to create a separate thread, there is no need to deal
with APCs at all, I beleive. We can just use the existing timeout
functionality in WaitForSingleObjectEx(), which simplifies the code a
bit.
That is assuming we don't need sub-millisecond accuracy, because WFSO
only provides milliseconds (waitabletimer provides 1/10th of a
microsecond).
Tested with both serial and parallel regression tests and with a manual
set statement_timeout test, just as yours. And finally, also tested the
deadlock detection which I beleive also uses setitimer().
//Magnus
PS. Qingqing: it helps at least me if you can post your patch as an
attached file instead of inline. That makes absolutely sure my mailer
(yeah, I know...) doesn't get a chance to break the lines.
Attachment | Content-Type | Size |
---|---|---|
timer2.patch | application/octet-stream | 6.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2005-10-23 16:07:58 | Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance |
Previous Message | Andrew Dunstan | 2005-10-23 15:27:10 | Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance |