On Fri, 14 Feb 2025 16:20:33 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> If you mean two threads accessing this same TabPaneSkin instance, then >> that's not a valid case. JavaFX objects are not thread-safe when accessed >> from multiple threads. This bug (and the other related bugs fixed or under >> review) is about making sure that multiple threads, including the JavaFX >> application thread, each concurrently accessing their own instance, don't >> interfere with each other. >> >> So it would only be a problem if "cleanup" attempted some animation or >> touched static state or similar, which is doesn't look like it does. > > Although, having said that, the purpose of the cleanup is to clean up after > the animation. So a better fix might be to put the entire if-else inside an > `if (Platform.isFxApplicationThread())` test. Actually, no. It also calls requestLayout. I think the fix is correct as is. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1699#discussion_r1956412231