[crac] RFR: Introduce per-Priority Context with different policies [v4]

Radim Vansa duke at openjdk.org
Wed May 31 06:27:27 UTC 2023


On Thu, 18 May 2023 12:31:53 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> Anton Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update
>
> src/java.base/share/classes/jdk/crac/impl/BlockingOrderedContext.java line 20:
> 
>> 18:             // We won't cause IllegalStateException because this is not an unexpected state
>> 19:             // from the point of CRaC - it probably tried to register some code before.
>> 20:             throw new RuntimeException("Interrupted thread tried to block in registration of " + resource + " in " + this);
> 
> The use of `this` in the exception relies on naming the context and the `toString()` method for easy identification. Since you've removed these it will show only class type rather than Global Context/custom name/JDK resource priority.

I am not sure if this was missed - you've created named context in the tests (so the message in there looks right) but this still does not work well for any contexts regularly used (global/core priority contexts).

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

PR Review Comment: https://git.openjdk.org/crac/pull/74#discussion_r1211123987


More information about the crac-dev mailing list