Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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


pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2004-01-08 21:56:38
Subject: Re: Win32 signal code - first try
Previous:From: Merlin MoncureDate: 2004-01-08 21:08:19
Subject: Re: Win32 signal code - first try

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group