[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-nio-dev
Subject:    Re: RFR: 8324972: (bf) Make DirectByteBuffer.Deallocator idempotent [v4]
From:       Mark Sheppard <msheppar () openjdk ! org>
Date:       2024-02-21 19:35:59
Message-ID: HV0OkJDThqpKWlTCUd41ICISEJUq5s0nKdJzhpzcB0c=.5be7ce74-a3ee-490b-83cb-5d3d0e215236 () github ! com
[Download RAW message or body]

On Thu, 8 Feb 2024 10:58:05 GMT, Per Minborg <pminborg@openjdk.org> wrote:

> > This PR proposes to make deallocators and unmappers for memory regions \
> > idempotent. This is to prevent (likely very rare) duplicate invocations.  
> > There are no unit tests but it should be noted that the idempotent behavior (now \
> > correct) is similar to the  intended behavior before \
> > cf74b8c2a32f33019a13ce80b6667da502cc6722 but where idempotency was not guaranteed \
> > in a multi-threaded environment. 
> > Passes tier1, 2, and 3 tests.
> 
> Per Minborg has updated the pull request incrementally with two additional commits \
> since the last revision: 
> - Use existing UNSAFE static variable
> - Remove unused import

I'm refering to the safe publication of Deallocator via the Cleaner.create code ... \
the Deallocator reference is stored in a final field in the Cleaner, and the Cleaner \
is published via a synchronzied method, which I think would represent safe \
publication of the Deallocator (prior to it being turned into a record) ?

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

PR Comment: https://git.openjdk.org/jdk/pull/17647#issuecomment-1957761386


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic