<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">On 31/01/2024 01:34, Charles Oliver
Nutter wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAE-f1xRYby_TdzMmd9Kg9jafLth_WTsx13eEjiMoSBFmrw-v=Q@mail.gmail.com">:<span style="white-space: pre-wrap">
</span>
<pre class="moz-quote-pre" wrap="">
On Tue, Jan 30, 2024 at 1:12 AM Alan Bateman <a class="moz-txt-link-rfc2396E" href="mailto:Alan.Bateman@oracle.com"><Alan.Bateman@oracle.com></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
The pipe channel could be changed to work like the network channels and change it lazily,
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
It occurred to me that this would actually fix my problem very neatly.
The child side of the pipes would never be used from the parent, so
they would propagate with default blocking status. The parent streams
would be blocking until used from a vthread... or more likely, until
JRuby explicitly sets them nonblocking to match CRuby).
</pre>
</blockquote>
Also if explicitly configured to non-blocking via
configureBlocking(false), which code executing in any Thread can do.
Maybe doesn't arise in this user's environment but if you are use
posix_spawn directly then it's always been possible to have the
child inherit pipe sockets that were set to non-blocking in the
parent.<br>
<br>
That said, there isn't any reason to do have the pipe channels work
like the network channels and do it lazily. I have a draft PR [1]
that does this and will mull it over next week.<br>
<br>
-Alan<br>
<br>
<br>
[1] <a class="moz-txt-link-freetext" href="https://github.com/openjdk/jdk/pull/17648">https://github.com/openjdk/jdk/pull/17648</a><br>
<br>
<br>
</body>
</html>