On Wed, 6 Mar 2024 17:24:10 GMT, Martin Fox <m...@openjdk.org> wrote:

>> Marius Hanl has updated the pull request incrementally with four additional 
>> commits since the last revision:
>> 
>>  - test for multiple nested event loops
>>  - try leave outer loop after finishing inner loop
>>  - update copyright
>>  - trigger an outer nested event loop leave attempt
>
> The Mac is still failing the NestedEventLoop test.
> 
> At the top of InvokeLaterDispatcher.java there's a long explanation on how 
> it's trying to coordinate with the event loop. To do this it needs to have an 
> accurate picture of what's happening at the platform level. In this PR you're 
> telling the dispatcher that an event loop has exited before the platform has 
> actually exited the loop (before enterNestedEventLoop has returned). This is 
> causing the dispatcher to send runLater runnables to the platform earlier 
> than expected. On Windows the runnables will get deferred to the next event 
> loop cycle but on Mac the runnables might get executed in the current event 
> loop cycle. I think this is one of the "native system limitations" mentioned 
> in the comment in InvokeLaterDispatcher.java.
> 
> I've created a branch with my proposed fix for this problem 
> (https://github.com/beldenfox/jfx/tree/eventloopjam). The fix prevents the 
> dispatcher from jamming when the event loop it thought was leaving enters a 
> new loop instead. Over in the Mac Glass code I also added a comment with a 
> few more details on what's going on.

Thanks! I feel like we are coming closer to the fix of this problem. I 
hopefully have time to test this much more tomorrow - I have at least "booked" 
myself a time slot for JavaFX. 😄

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

PR Comment: https://git.openjdk.org/jfx/pull/1324#issuecomment-1984685350

Reply via email to