[crac] RFR: Fix ordering of invocation on Resources [v8]

Radim Vansa duke at openjdk.org
Wed May 10 07:11:38 UTC 2023


On Tue, 9 May 2023 18:14:31 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revert API change, force blocking registration
>
> src/java.base/share/classes/jdk/crac/Resource.java line 65:
> 
>> 63:      * resource throwing an exception when {@link #beforeCheckpoint(Context)
>> 64:      * beforeCheckpoint}.
>> 65:      * Therefore, the resource should not have assumptions about it state; it
> 
> Resource can be sure the beforeCheckpoint was called, and object is exactly in the state at which the beforeCheckpoint has leaved it.

I'll reword. The meaning here was to guide user to handling unexpected states, e.g. if the beforeCheckpoint is locking a lock this should not blindly unlock.

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

PR Review Comment: https://git.openjdk.org/crac/pull/60#discussion_r1189445759


More information about the crac-dev mailing list