RFR: 8369306: Implement invokeAndWait and finishTerminating on headless platform [v3]

Johan Vos jvos at openjdk.org
Sat Oct 11 09:08:21 UTC 2025


On Fri, 10 Oct 2025 14:47:13 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Jose Pereda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Process feedback from reviewer
>
> modules/javafx.graphics/src/main/java/com/sun/glass/ui/headless/NestedRunnableProcessor.java line 66:
> 
>> 64:     void stopProcessing() {
>> 65:         for (RunLoopEntry entry : activeRunLoops) {
>> 66:             runnableQueue.add(() -> entry.active = false);
> 
> I would highly recommend declaring `RunLoopEntry.active` `volatile`.

Can you elaborate on this? What usecase do you see where 2 threads might see different values, leading to problems that could not occur if active was volatile?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1934#discussion_r2422639516


More information about the openjfx-dev mailing list