On Thu, 15 Dec 2022 15:01:46 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with three additional 
>> commits since the last revision:
>> 
>>  - Improve benchmarks
>>  - Add benchmark
>>  - Use Bits instead of custom code
>
> src/java.base/share/classes/java/io/RandomAccessFile.java line 60:
> 
>> 58:  * {@code IOException} may be thrown if the stream has been closed.
>> 59:  *
>> 60:  * @implNote This class is not thread safe.
> 
> I don't think this should be an implNote. Maybe for a different issue/PR is 
> that the class description probably needs a paragraph to say that a RAF is 
> not thread safe and requires appropriate synchronization when used by 
> concurrent threads. This leads to discussion about a FileChannel obtained 
> from a RAF as FileChannel defines read/write methods that support cases where 
> threads need to access different parts of a file at the same time. There is a 
> lot more to say on this topic and probably best to keep it separate.

Nit: Also I think it needs hyphenation: `thread-safe`.

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

PR: https://git.openjdk.org/jdk/pull/11644

Reply via email to