On Tue, 12 Aug 2025 07:50:20 GMT, Alan Bateman <[email protected]> wrote:
>> Ah, this is about getting a `AdaptedRunnableAction` rather than a
>> `RunnableExecuteAction` (where the latter is an InterruptibleTask, and the
>> former isn't). Sounds worth of a comment here?
>
> Yes, it means we always adapt before calling submit, lazySubmit and
> externalSubmit rather than the mix of execute(Runnable) and xxxSubmit.
If it's already a `AdaptedRunnable` should we adapt it too? if not, can we
change the `ForkJoinTask.adapt` to something :
public static ForkJoinTask<?> adapt(Runnable runnable) {
if (runnable instanceOf AdaptedRunnableAction action)
return action
else return new AdaptedRunnableAction(runnable);
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26479#discussion_r2302872190