On 25/10/2018 01:05, Laurent Bourgès wrote:
According to me, Martin already exposed his detailled analysis of 2 cases 
making AWT to hang with several AppContexts: in summary, like a deadlock, the 
EDT threads are waiting for each other to dispatch SequencedEvents !

If you are talking about an example from this message:
http://mail.openjdk.java.net/pipermail/awt-dev/2018-October/014426.html

Then pay attention that it describes not a deadlock, but another situation. It 
has 4 events, one of them is dispatched in correct order(because it was created 
first), but others are not dispatched because they are not wakeup by the 
dispatched event. To me it looks like the bug is in the 
SequencedEvent.dispose() method, which should wakeup EDT where the next event 
should be dispatched.
Maybe it is possible to create/post a dummy WakeupEvent which will use 
SequencedEvent.ID and be used to wakeup the EDT?


Take a look to the test which was added in JDK-8152974:
http://hg.openjdk.java.net/jdk/jdk/rev/719064f540f3

This test creates a number of SequencedEvents and posts them in a different 
order to one/to many apcontexts, all of them are dispatched in the right order. 
I think it should be possible to create a new test based on the test above, 
which will fail on all platforms.


--
Best regards, Sergey.

Reply via email to