From: Paolo Bonzini Date: Thu, 28 Feb 2008 09:36:36 GMT Subject: Re: [PATCH 20/40] Windows: A rudimentary poll() emulation. Message-ID: <47C680A4.6050309@gnu.org> In-Reply-To: <1204138503-6126-21-git-send-email-johannes.sixt@telecom.at> Johannes Sixt wrote: > This emulation of poll() is by far not general. It assumes that the > fds that are to be waited for are connected to pipes. The pipes are > polled in a loop until data becomes available in at least one of them. > If only a single fd is waited for, the implementation actually does > not wait at all, but assumes that a subsequent read() will block. For the future, would it be better to first use WaitForMultipleObjects, and then use PeekNamedPipe to find which handles have data on it? That's how the mingw port of GNU Smalltalk does it. Paolo