Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Date
Msg-id 22261.1130100304@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
List pgsql-hackers
Qingqing Zhou <zhouqq@cs.toronto.edu> writes:
> Are we asserting that

>     UNBLOCKED_SIGNAL_QUEUE() != 0
>     then
>     WaitForSingleObjectEx(0)==WAIT_OBJECT_0

No.

> If so, we can put this assertion in.

Only if you want it to crash every so often.

The "race condition" is that a signal delivered right about the time the
check is made may be serviced before the event is set, meaning that
after the dust settles the event will still be set when there's nothing
to do.  This was true before, too, and will have no impact worse than
causing an extra entry to dispatch_signals later on.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Next
From: "Magnus Hagander"
Date:
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance