RFR: 8292698: Improve performance of DataInputStream

Alan Bateman alanb at openjdk.org
Tue Aug 23 17:16:36 UTC 2022


On Tue, 23 Aug 2022 15:50:56 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> But assuming I've reverted the changes that are dubious, how could there be bugs caused by replacement of multiple reads with a single one? I was sure that such replacement improves thread safety as soon as we rid racy reads.

The main thing is to think through the implications for async close where the close method replaces 'in'. There are a few examples in the JDK that extend FilterInputStream that do this. It was hard to reason about this scenario in the first iteration.

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

PR: https://git.openjdk.org/jdk/pull/9956


More information about the core-libs-dev mailing list