|Re: Swt &Thread [message #462077 is a reply to message #462066]
||Wed, 05 October 2005 19:13
Originally posted by: richkulp.us.NO_SPAM.ibm.com|
syncExec on the UI thread doesn't buy much because it immediately turns
around and calls the runnable and then returns when the runnable is
done. You could of done that yourself.
asyncExec on the UI thread still works correctly by posting the runnable
off to the queue and returns immediately. If you call asyncExec on the
UI thread you are guarenteed that you will return from the asyncExec
call immediately and the runnable will be executed later on the UI
thread. This is sometimes a useful concept. There are certain things
that need to be done on the UI thread but can't be done at the
particular point in time due to some UI constraint. So you use asyncExec
to get it to run later.
Powered by FUDForum
. Page generated in 0.02465 seconds