Re: RFR: 8280041: Retry loop issues in java.io.ClassCache [v4]

2022-01-25 Thread Aleksey Shipilev
On Tue, 25 Jan 2022 16:12:11 GMT, Aleksey Shipilev wrote: > > This looks good, although I don't know whether the additional check for > > strongReferent != null is needed in clearStrong(). This is all racy code > > and you have already got a non-null return from getStrong() in case you are > >

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache [v4]

2022-01-25 Thread Aleksey Shipilev
On Mon, 24 Jan 2022 21:32:16 GMT, Peter Levart wrote: > This looks good, although I don't know whether the additional check for > strongReferent != null is needed in clearStrong(). This is all racy code and > you have already got a non-null return from getStrong() in case you are > calling cle

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache [v4]

2022-01-24 Thread Peter Levart
On Fri, 21 Jan 2022 11:04:22 GMT, Aleksey Shipilev wrote: >> JDK-8277072 introduced java.io.ClassCache, but there seem to be at least two >> issues with it: >> - The cache cannot disambiguate between cleared SoftReference and the >> accidental passing of `null` value; in that case, the retry

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache [v4]

2022-01-21 Thread Aleksey Shipilev
> JDK-8277072 introduced java.io.ClassCache, but there seem to be at least two > issues with it: > - The cache cannot disambiguate between cleared SoftReference and the > accidental passing of `null` value; in that case, the retry loop would spin > indefinitely; > - If retry loop would spin