If no such event is posted to the queue, it will lead to hang right? And also, the correct order of processing is not by the event number, but rather by the condition check to see if the current event is the first event in the separate list maintained for SequencedEvents. Just repeating it for reference: "edt.pumpEvents(ID, () -> !SequencedEvent.this.isFirstOrDisposed());"
Thanks, Krishna -----Original Message----- From: Semyon Sadetsky Sent: Thursday, March 15, 2018 10:36 PM To: Krishna Addepalli <[email protected]>; [email protected] Subject: Re: <AWT Dev> [11][JDK-8152974] AWT hang occurs when sequenced events On 03/15/2018 09:59 AM, Krishna Addepalli wrote: > Hi Semyon, > > SequencedEvent is created with FOCUS_LAST + 1 as its id, whereas when it is > dispatching events, it is looking for FOCUS_LAST + 2, which is causing the > hang. I think it correctly waits for FOCUS_LAST + 2 to guaranty the right order of processing in which the sequenced event is first processed on another EDT. --Semyon > I have modified it to look for only FOCUS_LAST + 1 events, which has fixed > the problem. > > Thanks, > Krishna > > -----Original Message----- > From: Semyon Sadetsky > Sent: Thursday, March 15, 2018 9:14 PM > To: Krishna Addepalli <[email protected]>; > [email protected] > Subject: Re: <AWT Dev> [11][JDK-8152974] AWT hang occurs when > sequenced events > > Hi Krishna, > > You have replaced FOCUS_LAST+2 with the FOCUS_LAST+1 which is absolutely > different event. > > They can be used interchangeably? > > --Semyon > > > On 03/14/2018 07:53 AM, Krishna Addepalli wrote: >> Hi Sergey, >> >> As per our discussion, I have modified the fix to process only >> SequencedEvents and ignore others. I have also modified the test case to >> include some dummy events between two SequencedEvents, and it works. >> Here is the new webrev: >> http://cr.openjdk.java.net/~kaddepalli/8152974/webrev01/ >> >> However, could you point me to a doc/spec which says that all the >> SequencedEvents have to be processed together, even if other events in the >> queue have arrived before? >> >> Thanks, >> Krishna >> >> -----Original Message----- >> From: Krishna Addepalli >> Sent: Saturday, February 17, 2018 7:57 AM >> To: Sergey Bylokhov <[email protected]>; >> [email protected]; Semyon Sadetsky >> <[email protected]> >> Subject: RE: <AWT Dev> [11][JDK-8152974] AWT hang occurs when >> sequenced events >> >> Hi Sergey, >> >> The event is present, but with the id >> "java.awt.event.FocusEvent.FOCUS_LAST+1", whereas when it is pumping the >> events, it is looking for "java.awt.event.FocusEvent.FOCUS_LAST+2", which is >> not in the queue. >> >> Thanks, >> Krishna >> >> -----Original Message----- >> From: Sergey Bylokhov >> Sent: Saturday, February 17, 2018 1:49 AM >> To: Krishna Addepalli <[email protected]>; >> [email protected]; Semyon Sadetsky >> <[email protected]> >> Subject: Re: <AWT Dev> [11][JDK-8152974] AWT hang occurs when >> sequenced events >> >> Hi, Krishna. >> On 16/02/2018 00:42, Krishna Addepalli wrote: >>> The SentEvent.ID value is "java.awt.event.FocusEvent.FOCUS_LAST+2", and >>> when in the function pumpOneEventForFilters, it tries to call >>> EventQueue.getNextEvent(id), it looks for SentEvent.ID, which is not >>> present, and then the queue blocks in the hope that someone will post that >>> event. This is what is leading to the hang. >> But both events are posted by the test, why the second event is not present >> in the queue? >> >>
