On Mon, 21 Nov 2022 12:05:31 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> The reason for the comment is to make it clear why `DirectBuffer::address` 
>> can be used directly without guarding. This will also reduce the probability 
>> of unnecessary guarding being added in the future. However, if the consensus 
>> is that these comments just adds confusion, I am happy to remove them.
>
> I'd prefer to see this comment removed from all places that are obviously 
> interacting with the direct buffer cache. These usages are try-finally to 
> acquire and return the temporary direct buffer cache back to the cache. 
> Talking about closable sessions here is definitely confusing.

> Thanks for persisting with it, latest version looks okay to me and the naming 
> issue can be sorted out after the JEP is integrated.


IMHO the renaming is not super important - the underlying abstraction managing 
the segment lifetime is still called MemorySession, even after 
https://git.openjdk.org/jdk/pull/10872. And, acquire/release are methods on 
MemorySession - so I think the current name might be more precise even after we 
integrate the latest API changes.

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

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

Reply via email to