(+ (* 1000 to-sec) (truncate to-usec 1000))
-1)
when (or #!+win32 (eq direction :output)
+ #!+win32 (sb!win32:handle-listen
+ (sb!win32:get-osfhandle fd))
+ #!-win32
(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))))))))
+ do (when to-sec (maybe-update-timeout))
+ #!+win32 (sb!thread:thread-yield)))))))
\f
;;; Wait for up to timeout seconds for an event to happen. Make sure all
;;; pending events are processed before returning.