[project @ 2002-07-23 22:04:36 by sof]
authorsof <unknown>
Tue, 23 Jul 2002 22:04:36 +0000 (22:04 +0000)
committersof <unknown>
Tue, 23 Jul 2002 22:04:36 +0000 (22:04 +0000)
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.)

cbits/inputReady.c

index 5b1e005..8677f26 100644 (file)
@@ -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) {