|
|
|
|
|
Re: Eclipse View Refresh Problem [message #760483 is a reply to message #760103] |
Fri, 02 December 2011 14:31 |
|
By design, syncExec() will always block the current thread until the Runnable has been processed by the UI Thread. In RAP this can be very dangerous since the UI Thread only runs when the user initiates an action (except in the case of UICallback). Also, if the user has already closed their browser but the session has not yet timed out then the calling thread will block forever. Also there is an outstanding bug in RAP[1] that will not release the calling thread even when the display is disposed.
IMHO, syncExec() should never be used in RAP due to the asynchronous nature of RAP and the unexpected consequences that result. Users tend to think that it will let them update the UI from a background thread, but that is not the case. Updating from a background thread is covered in the FAQ that Rüdiger linked to.
Hope that helps users avoid confusion,
Cole
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=328347
|
|
|
Re: Eclipse View Refresh Problem [message #760488 is a reply to message #760103] |
Fri, 02 December 2011 14:31 |
|
By design, syncExec() will always block the current thread until the Runnable has been processed by the UI Thread. In RAP this can be very dangerous since the UI Thread only runs when the user initiates an action (except in the case of UICallback). Also, if the user has already closed their browser but the session has not yet timed out then the calling thread will block forever. Also there is an outstanding bug in RAP[1] that will not release the calling thread even when the display is disposed.
IMHO, syncExec() should never be used in RAP due to the asynchronous nature of RAP and the unexpected consequences that result. Users tend to think that it will let them update the UI from a background thread, but that is not the case. Updating from a background thread is covered in the FAQ that Rüdiger linked to.
Hope that helps users avoid confusion,
Cole
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=328347
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03325 seconds