[crac] RFR: Update Reference Handling for CRaC [v3]
Dan Heidinga
heidinga at openjdk.java.net
Fri May 27 15:53:30 UTC 2022
On Mon, 25 Apr 2022 17:59:57 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> This change updates Reference Handling after Alan's comments [1].
>> * The new API is moved to the CRaC-related classes to avoid polluting or changing standard classes. This should make EA builds more attractive.
>> * The method for waiting threads now accepts timeout, as turns to be needed by CleanerImpl.beforeCheckpoint().
>> * Now reference handling outside of the JDK code is supported, see the supplied test update. The handing does not depend on the first-level reference processing thread's beforeCheckpoint is called first. After that, it was possible to remove the resource and the corresponding REFERENCE_HANDLER priority.
>>
>> The methods for waiting threads cannot guarantee that a reference handling is complete for a particular queue and a set of threads, as nothing prevents an another concurrent thread to change the reachability of a random object that will end up in the queue after the method returns. The method is designed to synchronize reference handling and checkpoint. That is, to ensure that objects that are on the way to be enqueued are indeed enqueued and corresponding clean-up is performed, as demonstrated by the test.
>>
>> [1] https://github.com/openjdk/crac/pull/13#issuecomment-1028024855
>
> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>
> Make jdk.crac.Misc final
Marked as reviewed by heidinga (Committer).
-------------
PR: https://git.openjdk.java.net/crac/pull/22
More information about the crac-dev
mailing list