You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows pipes: one implementation of the pipe-room/peek P/Invokes; read_nonblock's PeekNamedPipe fallback is mostly dead #145
After #116 and #119, Windows pipe readiness lives in two places:
Src/Ruby/Builtins/WindowsPipeStream.cs declares NtQueryInformationFile / FILE_PIPE_LOCAL_INFORMATION (WriteQuotaAvailable(), IsReaderGone()) and PeekNamedPipe.
Src/Libraries/Builtins/IoReadiness.cs declares the same again (GetWindowsPipeRoom, IsWindowsPipeWritable, IsWindowsPipeReadable), used by IO.select.
The two differ slightly. GetWindowsPipeRoom returns Int32.MaxValue when the reader is gone; WindowsPipeStream asks IsReaderGone() separately.
IoOps.ReadOnceWithoutWaiting also has a Windows-pipe PeekNamedPipe fallback for read_nonblock, added in #119. Since #116, IO.pipe and popen pipes are WindowsPipeStreams, which implement INonBlockingReadStream and take the path before that fallback. The fallback now only matters for a pipe that reaches an IO some other way (an inherited handle wrapped by IO.for_fd?), if that happens at all.
Suggested cleanup: keep one implementation (WindowsPipeStream's, made internal static helpers on it or a small WindowsPipe class), have IoReadiness call it, and either drop the read_nonblock fallback or document what still reaches it. No behaviour change. Io_Timeout2, WeakMap_NoBlock1, Windows_PipeBlocking1, Windows_StdoutPipeSysWrite1 and ruby/spec core/io on Windows are the checks.
Activity
Merge pull request #148 from Largo/claude/core-fixes-2