On Tue, 23 Apr 2024 07:27:02 GMT, Alan Bateman <al...@openjdk.org> wrote:
> > Has the alternative of moving to a j.u.c.Lock (Needs Reentrant or not?) > > been explored/benchmarked? > > Yes, decided not to do because it's just guarding access to a byte[] and any > changes can influence the inlining. Plus, it would need to continue to use > monitors when extended as the subclass may assume synchronization in the > super class. Limiting it to just the problematic writeTo method seem the > least risky. That's true, good points across the board. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18901#issuecomment-2071869067