[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Question regarding DelayedEventsProcessor

asyncExec puts the request in the back of the queue. it may just be an implementation choice to let other events execute first.


On Thu, Jun 21, 2018 at 1:07 PM, Becker, Matthias <ma.becker@xxxxxxx> wrote:
Dear Platform Experts,

I have a question regarding the implementation of DelayedEventsProcessor.

When a user chooses âOpen with > Eclipseâ e.g. from Windows File Explorer context menu the Display's implementation fires the SWT.OpenDocument event. DelayedEventsProcessor is the Handler that listens to this event. When such an event is received this handle only stores this in an array. The actual processing takes place later. It takes place when the catchUp method is called. According to the JavaDoc âThis method is called when there are currently no more events on the queue to be processed at the moment.â So this is event is processed when the UI-queue is free.

When you look now into the implementation of DelayedEventsProcessor#openFile you see that the complete work is done inside a âdisplay.asyncExecâ. I wonder why this is done.
aynchExec puts the runnable at the end of the UI queue and executes the work in the UI thread. But we are currently in the UI Thread and we got called because no other stuff needs to be done in the UI queue. So I would say we donât need that âasynchExecâ here. Or do I overlook something?

Regards,
Matthias

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev