Avoid some exceptions in WAIT-UNTIL-FD-USABLE on Windows
authorAnton Kovalenko <anton@sw4me.com>
Wed, 13 Oct 2010 23:18:06 +0000 (03:18 +0400)
committerDavid Lichteblau <david@lichteblau.com>
Wed, 10 Aug 2011 18:04:28 +0000 (20:04 +0200)
  Always report the :output direction as usable on win32.
  Fixes this function as needed for sb-simple-streams.

Thanks to Anton Kovalenko.

src/code/serve-event.lisp

index 2b72d84..2faa401 100644 (file)
@@ -211,7 +211,8 @@ waiting."
              (loop for to-msec = (if (and to-sec to-usec)
                                      (+ (* 1000 to-sec) (truncate to-usec 1000))
                                      -1)
-                   when (sb!unix:unix-simple-poll fd direction to-msec)
+                   when (or #!+win32 (eq direction :output)
+                            (sb!unix:unix-simple-poll fd direction to-msec))
                    do (return-from wait-until-fd-usable t)
                    else
                    do (when to-sec (maybe-update-timeout))))))))