Re: Escaping from blocked send() reprised.

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Escaping from blocked send() reprised.
Дата
Msg-id 20150116113917.GA16991@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Escaping from blocked send() reprised.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Hi Heikki,

On 2014-09-02 21:22:29 +0300, Heikki Linnakangas wrote:
> On 08/28/2014 03:47 PM, Kyotaro HORIGUCHI wrote:
> >   To make the code mentioned above (Patch 0002) tidy, rewrite the
> >   socket emulation code for win32 backends so that each socket
> >   can have its own non-blocking state. (patch 0001)
> 
> The first patch that makes non-blocking sockets behave more sanely on
> Windows seems like a good idea, independently of the second patch. I'm
> looking at the first patch now, I'll make a separate post about the second
> patch.

> On Windows, the backend has an emulation layer for POSIX signals, which uses
> threads and Windows events. The reason win32/socket.c always uses
> non-blocking mode internally is that it needs to wait for the socket to
> become readable/writeable, and for the signal-emulation event, at the same
> time. So no, we can't remove it.
> 
> The approach taken in the first patch seems sensible. I changed it to not
> use FD_SET, though. A custom array seems better, that way we don't need the
> pgwin32_nonblockset_init() call, we can just use initialize the variable.
> It's a little bit more code, but it's well-contained in win32/socket.c.
> Please take a look, to double-check that I didn't screw up.

Heikki, what's your plan about this patch? Do you plan to commit it?

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: More Norwegian trouble
Следующее
От: Manuel Kniep
Дата:
Сообщение: Re: segmentation fault in execTuples.c#ExecStoreVirtualTuple