Re: Patch for Win32 blocking problem - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Patch for Win32 blocking problem
Date
Msg-id 452E1946.3070205@sigaev.ru
Whole thread Raw
In response to Re: Patch for Win32 blocking problem  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
Attached patch implements that idea.

> May be that way (untested):
>
> if ( isUDP && (what & FP_WRITE) )
> for(;;) {
>     r = WaitForMultipleObjects(100 ms);
>     if ( r == WAIT_TIMEOUT ) {
>         r == WSASend( sero packet ); /* see comments in pgwin32_select()
>  */
>         [ analyze result of WSASend:
>             * if success then return 1
>             * WSAEWOULDBLOCK - continue loop
>             * SOCKET_ERROR - return 0
>         ]
>     } else
>         break;
> }

--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

Attachment

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: GROUP BY on a large table -- an idea
Next
From: "Mark Woodward"
Date:
Subject: Re: Hints WAS: Index Tuning Features