[crac] RFR: Register CallSite cleaners with higher priority
Anton Kozlov
akozlov at openjdk.org
Fri May 12 10:59:07 UTC 2023
On Fri, 12 May 2023 07:21:36 GMT, Radim Vansa <duke at openjdk.org> wrote:
> Cleaners for CallSites cannot be registered with regular CLEANERS priority as this would hang/throw exceptions any time a lambda or method reference is used during or after processing this resource priority class; therefore we postpone as the last priority.
LGTM as a workaround, but indeed we need to generalize the problem and think about possible solutions.
src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java line 94:
> 92: // CleanerFactory class) until cleanup is performed.
> 93: new CleanerImpl.PhantomCleanableRef(cs, CleanerFactory.cleaner(),
> 94: newContext, JDKResource.Priority.CALL_SITES);
This is based on impl details. Is it possible to use e.g. a `CleanerFactory.criticalCleaner().register(...)` that will use different priorities?
-------------
Marked as reviewed by akozlov (Lead).
PR Review: https://git.openjdk.org/crac/pull/66#pullrequestreview-1424208186
PR Review Comment: https://git.openjdk.org/crac/pull/66#discussion_r1192189130
More information about the crac-dev
mailing list