From: sof Date: Tue, 23 Jul 2002 22:04:36 +0000 (+0000) Subject: [project @ 2002-07-23 22:04:36 by sof] X-Git-Tag: nhc98-1-18-release~932 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a1717debdfde05cec5e50693ac533a70434df1c8;p=haskell-directory.git [project @ 2002-07-23 22:04:36 by sof] inputReady(): using MsgWaitForMultipleObjects() instead of WaitForMultipleObjects() on file handles is nicer from within a message pump, but here it is less confusing to use the latter (and simply just block message delivery for its duration.) --- diff --git a/cbits/inputReady.c b/cbits/inputReady.c index 5b1e005..8677f26 100644 --- a/cbits/inputReady.c +++ b/cbits/inputReady.c @@ -50,11 +50,10 @@ inputReady(int fd, int msecs, int isSock) DWORD rc; HANDLE hFile = (HANDLE)_get_osfhandle(fd); - rc = MsgWaitForMultipleObjects( 1, - &hFile, - FALSE, /* wait all */ - msecs, /*millisecs*/ - QS_ALLEVENTS); + rc = WaitForMultipleObjects( 1, + &hFile, + TRUE, /* wait all */ + msecs); /*millisecs*/ /* 1 => Input ready, 0 => not ready, -1 => error */ switch (rc) {