Skip wait_read/wait_write on Windows for blocking fds
On Windows, select() only works with socket handles, not with pipe
handles or regular file handles. Calling wait_read or wait_write on
a blocking pipe fd would fail because the underlying select() call
cannot handle non-socket HANDLEs.
Skip the wait_read/wait_write calls on Windows (guarded by Sys.win32)
and let the worker thread handle blocking directly. This is safe
because Sys.win32 is a compile-time constant, so there is no runtime
overhead on Unix platforms.
Affected call sites: read, pread, read_bigarray, write, pwrite,
write_bigarray (6 total).
bed3a4
-
Mar 03 17:44 +00:00