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

Alan Bateman alanb at openjdk.java.net
Sun Nov 21 19:26:07 UTC 2021


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

>>>BTW: Would it possible to sync up your loom, it looks like hasn't been updated for some time.
>> 
>> Uhm... syncing *what*?
>
>> 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.

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

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


More information about the nio-dev mailing list