On Wed, Sep 1, 2010 at 4:11 PM, Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> wrote: > The obvious next question is how to wait for multiple sockets and a latch at > the same time? Perhaps we should have a select()-like interface where you > can pass multiple file descriptors. Then again, looking at the current > callers of select() in the backend, apart from postmaster they all wait for > only one fd.
Currently backends have not waited for multiple sockets, so I don't think that interface is required for now. Similarly, we don't need to wait for the socket to be ready to *write* because there is no use case for now. >> Windows implementation of WaitLatchAndSocket() seems not to be >> so simple. We would need to wait for both the latch event and >> the packet from the socket by using WaitForMultipleObjectsEx(). > > Well, we already use WaitForMultipleObjectsEx() to implement select() on > Windows, so it should be straightforward to copy that. I'll look into that. Agreed. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers