On Thu, 15 Jun 2023 21:14:06 GMT, Harshitha Onkar <[email protected]> wrote:
> @aivanov-jdk If just the `_SetSpans()` on native is changed to run as > `InvokeFunction` instead of `InvokeFunctionLater` both the tests - > ScrollPaneLeakTest.java & ScrollPaneExtraScrollBar.java pass without > additional code changes to WScrollPanePeer.java.childResized and _setInsets. I know it. But I think it's bad. If both `_SetSpans` and `_SetInsets` are synchronous by using `InvokeFunction`, you block EDT to run some code on the toolkit thread twice: 1. EDT calls `_SetSpans`, it gets blocked until `SetSpans` completes on the toolkit thread; 2. EDT calls `_SetInsets`, it gets blocked until `SetInsets` completes on the toolkit thread. I think blocking is bad. I coalesced these two calls into one asynchronous call. There's no EDT blocking with the same result. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14478#issuecomment-1593817579
