On Mon, 29 Jan 2024 13:07:21 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

> I don't think this will do what you want. This will return almost 
> immediately, before any of the animation has run (as soon as the runnable 
> that sets the uncaught exception handler finished).

I observed that this setup works correctly for the `AnimationTimer` test. The 
test does wait for `GRACE_PERIOD` seconds when there is no exception and then 
succeeds, or catches and fails immediately when there onw is thrown. The 
`Animation` test was more finicky, but I think that is because I'm not 
simulating a processing load properly.

> The await ensures that the uncaught exception handler has been registered 
> before starting the threads. 

While technically true, the handler register in a negligible amount of time 
compared to the grace period. Because exceptions are thrown continuously )it's 
not a one-time event), the handler will never miss a failure.

I will change it for correctness sake.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1352#discussion_r1469783805

Reply via email to