On Mon, 3 Feb 2025 17:34:05 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>> Actually, in looking at this further, I wanted to suggest an alternative >> approach. Rather than having each background thread poke the application >> thread to run a test loop every 100 test loops of that background thread, >> you might consider having one additional thread whose job it is to >> periodically run a test loop on the app thread. With the current approach, >> it is likely running an app thread loop far more often than wanted for two >> reasons: >> >> 1. The background threads are (intentionally) free running rather than being >> tied to a frame or even a small sleep >> 2. Each background thread independently fires an FX app pass every 100 >> passes, meaning that if there are 20 threads, it will effectively run every >> 5 passes of a background thread (every 100 passes will queue up 20 calls to >> run a pass on the FX app thread) >> >> Having a dedicated test thread for testing on the FX app thread would allow >> to control its frequency independent of the background threads. >> >> What do you think? > > I like it. > > Also, I think we may want to add a bit of randomness to the process - in the > "jiggler" thread, as well as to tests themselves. A bit of randomness in the "jiggler" thread seems good. Not sure about adding more randomness in the tests -- maybe, but having them free running (rather than sleeping) is probably more stressful. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1690#discussion_r1939784740