Re: Win32 signal code - first try

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org>
Cc: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Subject: Re: Win32 signal code - first try
Date: 2004-01-08 21:27:58
Message-ID: 303E00EBDD07B943924382E153890E5434AA41@cuthbert.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Magnus Hagander 2004-01-08 21:56:38 Re: Win32 signal code - first try
Previous Message Merlin Moncure 2004-01-08 21:08:19 Re: Win32 signal code - first try