[code-reflection] RFR: Lazily invoke lambda op building method [v3]

Mourad Abbay mabbay at openjdk.org
Fri Dec 19 22:32:09 UTC 2025


On Fri, 19 Dec 2025 20:59:21 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Apply suggestions
>
> test/jdk/java/lang/reflect/code/TestQuotedUnique.java line 32:
> 
>> 30:         int j = 8;
>> 31:         IntUnaryOperator q = (@Reflect IntUnaryOperator) i -> i * 2 + j;
>> 32:         List<Quoted> quotedObjects = IntStream.range(1, 3).parallel().mapToObj(_ -> Op.ofQuotable(q).get()).toList();
> 
> We need to think more carefully about this approach. I think we need N threads in proportion to the runtime threads all executing and waiting on a count down latch so all are trigger to call `Op.ofQuotable(q)` at the roughly the same time and all threads should produce the same result, returning exactly the same object or throwing UOE. Then run that process in a loop for say 100 iterations.

So the current approach is not testing in parallel ?

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

PR Review Comment: https://git.openjdk.org/babylon/pull/769#discussion_r2636477734


More information about the babylon-dev mailing list