On Thu, 9 Nov 2023 22:09:30 GMT, Jose Pereda <jper...@openjdk.org> wrote:

>> Johan Vos has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Use only 10 cycles instead of 50 (preventing this test to take 50 seconds 
>> in case it fails).
>
> tests/system/src/test/java/test/javafx/stage/SystemMenuBarTest.java line 164:
> 
>> 162:                     });
>> 163:                 }
>> 164:                 Platform.runLater( () -> {
> 
> Why is `Platform.runLater` needed here? To wait until the last 
> `Platform.runLater` in the for loop ends? Is it guaranteed that it will be 
> called only after the previous one ends? 
> 
> Minor: remove unneeded white space: `Platform.runLater(() -> {`

No, it is needed because we want to give the JavaFX platform the opportunity to 
do "whatever is needed" after the last runLater() is done. Hence, we put what 
we want to do on the Runnable queue of the FX thread, so that we don't depend 
on internals.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1277#discussion_r1389184538

Reply via email to