On Thu, 21 Apr 2022 00:00:47 GMT, Stuart Marks <sma...@openjdk.org> wrote:
> > I think it's a vanishingly small possibility that anything is relying on the > synchronization in these methods. Synchronization here would provide proper > memory visibility effects across threads. To use input streams from multiple > threads without interleaving operations, one would have to provide some other > means of coordination among those threads, which itself would likely ensure > proper memory visibility. I'm hard pressed to see how threads could > coordinate solely via use of the `mark` and `reset` methods. Therefore, I > think it's safe to remove synchronization from them. > > This reasoning also applies to `InputStream`. Perhaps synchronization can be > removed from there too. > > I agree that a CSR is probably warranted to capture the behavior change and > analysis. Commit f210cbf5f6bf58326a379b4b3f55fddf49d30f5c removed the synchronization from `InputStream`'s `mark()` and `reset()`; a CSR is on file. ------------- PR: https://git.openjdk.java.net/jdk/pull/8309