RFR: 8313768: Reduce interaction with volatile field in j.u.l.StreamHandler

Daniel Fuchs dfuchs at openjdk.org
Tue Aug 8 13:30:31 UTC 2023


On Fri, 4 Aug 2023 14:51:35 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:

> In `publish0()`, `flush0()` and `flushAndClose()`methods of `StreamHandler` we read multiple times from volatile writer. The access number can be reduced by reading the field into local variable once.

LGTM

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

Marked as reviewed by dfuchs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15161#pullrequestreview-1567302875


More information about the core-libs-dev mailing list