On Tue, Aug 31, 2010 at 4:06 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Here's a 2nd version of the "latch" patch. Now with a Windows
> implementation. Comments welcome.
Seems good.
Two minor comments:
> rc = WaitForSingleObject(latch->event, timeout / 1000);
> if (rc == WAIT_FAILED)
> {
> ereport(ERROR,
> (errcode_for_socket_access(),
> errmsg("WaitForSingleObject() failed: error code %d", (int) GetLastError())));
> }
> if (rc == WAIT_TIMEOUT)
> break; /* timeout exceeded */
We should also check "rc == WAIT_OBJECT_0"?
> static volatile HANDLE waitingEvent = false;
s/false/NULL?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center