[crac] RFR: Prevent concurrent cleanup by cleaner thread and checkpoint notifications

Anton Kozlov akozlov at openjdk.org
Wed May 31 09:45:24 UTC 2023


On Wed, 31 May 2023 08:08:13 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> I mean, once we synchronized cleaner thread from picking up PhantomCleanableRefs, there is apparently no reason to go to the next priority and discover cleanups through registrations in the CRaC -- instead, all cleanups are discoverable thorugh the list maintained by the cleaner. It seems we can go through the list right from this Resource and run cleanups.
>
> Alright, you mean that PCRs won't be Resources anymore and we'll clean them up whether are these already in the `queue` or not, without waiting for the GC to move them into that.

Something like that, but indeed the interaction between RefQueue and the list maintained by the cleaner should reviewed in the context is it safe and correct to do that.

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

PR Review Comment: https://git.openjdk.org/crac/pull/73#discussion_r1211383901


More information about the crac-dev mailing list