[crac] RFR: Introduce per-Priority Context with different policies [v5]
Anton Kozlov
akozlov at openjdk.org
Wed May 31 08:57:30 UTC 2023
On Wed, 31 May 2023 05:59:31 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> 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).
The name complicates the interface and from the stack trace the context will be completely evident.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/74#discussion_r1211321284
More information about the crac-dev
mailing list