RFR: 8329138: Convert JFR FileForceEvent to static mirror event [v2]

Alan Bateman alanb at openjdk.org
Tue Apr 16 06:34:59 UTC 2024


On Mon, 15 Apr 2024 20:39:26 GMT, Tim Prinzing <tprinzing at openjdk.org> wrote:

>> test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 64:
>> 
>>> 62: 
>>> 63:             data.flip();
>>> 64:             ch.write(data, 0);
>> 
>> This just initiates the write operation, it doesn't wait until it completes. It returns a Future so adding .get() will ensure that it waits and that there is potentially data to write back to the file system.
>
> I do realize the write doesn't wait.  I was under the impression that flush() does wait until everything has been flushed to disk.  I went ahead and added .get() as requested.

In this API, the read/write methods are asynchronous, the force method is synchronous.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1566784789


More information about the core-libs-dev mailing list