On Thu, 30 Jan 2025 08:36:34 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> src/java.base/share/classes/java/nio/Bits.java line 146:
>> 
>>> 144:                 }
>>> 145: 
>>> 146:                 if (canary == null || canary.isDead()) {
>> 
>> If we're keeping Reference.waitForPendingReferences, why not continue to use 
>> it, rather than introducing
>> the canary as a new, ad hoc, reference processing progress detector?
>
> @kimbarrett Do you have a change coming to allow waitForPendingReferences be 
> used by WB? I assume this will at least add a comment to the method (or 
> whatever it changes to) to make it clear that it's for testing.

@AlanBateman I've not done any work on JDK-8305186.  There has also been 
discussion about making
that function non-private or even public (though with concerns about 
specification difficulty) for use in
places like this.

@shipilev I'm working on a reply, but it might be long-ish.  That outpacing 
issue for some tests is why this
code wasn't switched away from jdk.internal.ref.Cleaner a long time ago.  I'm 
still looking at it, but I currently
don't think the canary provides a reliable solution to that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22165#discussion_r1935907473

Reply via email to