On Mon, 13 Oct 2025 16:36:21 GMT, Kevin Rushforth <[email protected]> wrote:

>> I agree with @johanvos , it's always better to wait for the lock (with a 
>> timeout)
>
> Better, sure, but it isn't always possible in practice. There are times where 
> a delay is still needed.
> 
> This test now waits for the lock on the condition that will lead to the 
> thread shutting down. Good. It's still necessary to sleep for a small time to 
> be sure that it has.

As I said in my previous comment, I don't see this as a showstopper for this 
PR, but since it might help in general, I keep thinking about approaches to 
remove the sleep.
Wouldn't it be an option here to obtain the JavaFX Application Thread after the 
`assertTrue(Platform.isFxApplicationThread());` and assign it to e.g. `Thread 
fxThread` so that instead of the `Util.sleep` we can do `fxThread.join(10)` ? 
(I might be missing something though)

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

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

Reply via email to