RFR: 8276779: (ch) InputStream returned by Channels.newInputStream should have fast path for SelectableChannels [v14]

Markus KARG duke at openjdk.java.net
Tue Nov 23 17:41:15 UTC 2021


On Sun, 21 Nov 2021 19:23:01 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>>> Uhm... syncing _what_?
>> 
>> There was a typo, sorry. I meant your repo as the last commit from the main line is end Oct.
>
>> What I actually meant is: This is not apparent to the average Javadoc reader, so I propose to change PipeImpl to not run into this situation instead of asking all calling code to care for that.
> 
> A Pipe is two channels, one for each end. A typical usage will be for one thread to write to the sink, and another to read from the source. In the test you are only using one end, ignoring the other, so probably unusual. So while it would be possible to retrofit Pipe to implement AutoCloseable, it probably wouldn't fit many usages.

Agreed. But back to original topic: Is the PR now in an acceptable shape?

-------------

PR: https://git.openjdk.java.net/jdk/pull/5179


More information about the nio-dev mailing list