On Thu, 9 Nov 2023 09:25:11 GMT, Johan Vos <j...@openjdk.org> wrote:

>> tests/system/src/test/java/test/javafx/stage/SystemMenuBarTest.java line 145:
>> 
>>> 143:         stage.show();
>>> 144:         stage.requestFocus();
>>> 145:         Thread t = new Thread(){
>> 
>> Question: Since you do all the work in a `Platform.runLater`, is this thread 
>> needed?
>
> That's a good question. I do this because we start the test on the FX Thread, 
> but I want to add/remove the menuItems one by one, giving time for a `pulse` 
> in between them. If we do the 50 runs inside a single Runnable, without the 
> possibility for the FX Thread to do other work, the result can be different 
> compared to what we do when doing this in small runnables. 
> But I might be missing something here?

Oh, I see that now. I had missed that you were calling this method from within 
a `Util::runAndWait`. Never mind.

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

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

Reply via email to