|Re: help on status manager and (a)syncExec [message #632815 is a reply to message #632766]
||Thu, 14 October 2010 10:45
| Daniel KrÃ¼gler
Registered: July 2009
On 14.10.2010 10:33, Luca Ferrari wrote:|
> However, now that I guess I've understood the asyncExec a little more,
> does it make sense to use a thread to load the elements and execute a
> runnable instead of using a Job scheduled immediately?
I think the basic guide-line should be:
1) If you need to interact with the UI, use asyncExec
2) If your work has considerable parts that are UI-independent, use
a job for this. You will run in problematic situations, when
you have several dependent work units of the form
UI -> non-UI -> UI -> non-UI ->...
etc. If possible, try to isolate UI and non-UI work-units in as large
blocks as possible to prevent the overhead of an unnecessary high
number of context switching.
UIJob is somewhat in-between. I use it only, if I need to.
HTH & Greetings from Bremen,
Powered by FUDForum
. Page generated in 0.02766 seconds