On 14/03/2018 07:53, Krishna Addepalli wrote:
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.

Looks fine.

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?

This class is not public so it behavior is not completely specified. But even this javadoc specified that "If this method is invoked before all previous nested events have been dispatched, then this method blocks until such a point is reached." So yes SequencedEvents should be processed together according their order. it does not specify should we dispatch other events in between. But if we will dispatch other event then we will introduce "out of order dispatching", when some event which was posted after SequencedEvent will be dispatched first. So the question is why we need this "sort of out of order execution".


Thanks,
Krishna

-----Original Message-----
From: Krishna Addepalli
Sent: Saturday, February 17, 2018 7:57 AM
To: Sergey Bylokhov <sergey.bylok...@oracle.com>; awt-dev@openjdk.java.net; Semyon 
Sadetsky <semyon.sadet...@oracle.com>
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 <krishna.addepa...@oracle.com>; awt-dev@openjdk.java.net; 
Semyon Sadetsky <semyon.sadet...@oracle.com>
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?




--
Best regards, Sergey.

Reply via email to