On 2016-01-14 12:07:23 -0500, Robert Haas wrote:
> > Do we want to provide a backward compatible API for all this? I'm fine
> > either way.
> How would that work?

I'm thinking of something like;

int WaitOnLatchSet(LatchEventSet *set, int wakeEvents, long timeout);

WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,long 
        LatchEventSet set;

        LatchEventSetInit(&set, latch);

        if (sock != PGINVALID_SOCKET)
           LatchEventSetAddSock(&set, sock);

        return WaitOnLatchSet(set, wakeEvents, timeout);

I think we'll need to continue having wakeEvents and timeout parameters
for WaitOnLatchSet, we quite frequently want to wait socket
readability/writability, not wait on the socket, or have/not have

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to