Re: Win32 signal code - first try - Mailing list pgsql-hackers-win32

From Merlin Moncure
Subject Re: Win32 signal code - first try
Date
Msg-id 303E00EBDD07B943924382E153890E5434AA41@cuthbert.rcsinc.local
Whole thread Raw
List pgsql-hackers-win32
> 3. you are absolutely certain that
> __pg_poll_signals() +
> EnterCriticalSection +
> memset +
> if... +
> LeaveCriticalSection +
> if...
>
> is more efficient than a single call to WaitForSingleObjectEx() with 0
> timeout?

Some crude tests show that my 1 GHz P3 can execute about 1.2 million
calls to WaitForSingleObjectEx() in 1 second.  However, this is about
3.5 times slower than a quick mock up of your polling function I put
together.  Either approach, though, is pretty darn quick :).  Unlike
SleepEx(), WFSO does not stall the thread.

Merlin


pgsql-hackers-win32 by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: Win32 signal code - first try
Next
From: "Magnus Hagander"
Date:
Subject: Re: Win32 signal code - first try