Skip to main content

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

Hi Matthias,

after looking at the code, I also do not see a call path outside of
the UI Thread. I suggest opening a bug so that we can evaluate if this
display.asyncExec can be removed.

Best regards, Lars

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



-- 
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com


Back to the top