RFR: 8274113: (fc) Tune FileChannel.transferFrom() [v3]
Alan Bateman
alanb at openjdk.java.net
Thu May 12 09:15:58 UTC 2022
On Wed, 11 May 2022 17:24:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> This request proposes to change `FileChannel.transferFrom()` to add a fast path on Linux and a threshold for mapped transfers on all platforms.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8274113: Invert transferXXXSupported
src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 541:
> 539: // set this to true if we find out later that it doesn't
> 540: //
> 541: private static volatile boolean transferToNotSupported = false;
The motive for inverting these flags was to avoid the volatile write, so you can drop "= false" from both flags now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8644
More information about the nio-dev
mailing list