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

From Magnus Hagander
Subject Re: Win32 signal code - first try
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE2A6B04@algol.sollentuna.se
Whole thread Raw
List pgsql-hackers-win32
> > It is if you use WaitForMultipleObjectsEx(). Or if you use
> > WSAEventSelect() and then WaitForSingleObjectEx() on the
> event (this
> > emulates select() the closest)
>
> I'd just as soon as avoid WSAEventSelect; I think that will
> complicate matters quite a bit.
>
> FWIW, in a multithreaded version of postgres I'm fooling
> around with, I replaced the recv call (where backends spend
> most of their time waiting) which a select(small
> timeout)/SleepEx(0) "busy" loop, which calls to recv when
> ready. Works just fine.

It's probably not quite as fast, but that's not the point where we need
to go for max performance. It's probably an easier and smaller changes,
yes, so this looks like a good way. If it turns out bad we can always
change it later, and in that case it's good to have started with the
easy implementation :-)

//Magnus

pgsql-hackers-win32 by date:

Previous
From: Claudio Natoli
Date:
Subject: Re: Win32 signal code - first try
Next
From: "Merlin Moncure"
Date:
Subject: Microsoft releses Services for Unix