RFR: 8343039: Remove jdk.internal.misc.InternalLock and usages from java.io
Alan Bateman
alanb at openjdk.org
Wed Nov 13 07:18:15 UTC 2024
On Wed, 13 Nov 2024 03:11:41 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Uses of `InternalLock` are removed and `synchronized` is reinstated.
>
> src/java.base/share/classes/java/io/BufferedOutputStream.java line 88:
>
>> 86: }
>> 87:
>> 88: this.buf = new byte[initialSize]; // resizable if initialSize < maxSize
>
> Same remark as for BIS.
>
> Also this initial vs max size feature was added when virtual thread was first implemented as the internal locks. Is this implementation detail still necessary for the virtual threads?
Think about 100_000 virtual threads, all blocked on sockets with input/output streams that have wrapped with buffered streams, as in BIS and BOS. This is the motivation for using a reduced initial size.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22048#discussion_r1839629562
More information about the core-libs-dev
mailing list