On Thu, 4 May 2023 12:05:45 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Lukasz Kostyra has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update javafx.web classpath to include JMemoryBuddy
>
> tests/system/src/test/java/test/javafx/embed/swing/SwingNodeMemoryLeakTest.java
>  line 80:
> 
>> 78:         });
>> 79: 
>> 80:         SwingUtilities.invokeAndWait(() -> Util.sleep(500));
> 
> Sleeping on either the JavaFX Application thread or the Swing EDT (as in this 
> case) is not generally desirable. What is the sleep trying to achieve? Is 
> there a better way, possibly sleeping on the test thread and then doing a 
> `SwingUtilities.invokeAndWait` (maybe with a no-op runnable? not sure)?.

I can't believe I missed that!
I wonder if we could use CountDownLatch instead here and use 
Util.await(CountDownLatch) or something like that.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1121#discussion_r1185197255

Reply via email to