[crac] RFR: Active cleanup by CleanerImpl on checkpoint [v3]

Radim Vansa duke at openjdk.org
Thu Jun 8 08:35:36 UTC 2023

On Wed, 7 Jun 2023 15:57:49 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> This has a point, the waiting is not needed in here. I've moved the synchronization from previous version rather mindlessly.
> In the current state, at initialization `forceCleanup == cleanupComplete == false`. But after synchronization has been started, `forceCleanup == !cleanupComplete`, always. It seems possible to drop cleanupComplete, right?

Right. I also realized that I didn't handle thread termination well; had the thread exited just after setting `forceCleanup`, the checkpoint thread might end up waiting for a notify that never comes. I am not sure if this can happen in practice, because one of the refs in the list is the cleaner itself, but let's be on the safe side.


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

More information about the crac-dev mailing list