Community
Participate
Working Groups
When Display#wake is called from a background thread while the UIThread is currently running, it will have no effect, even though the UICallBack is active. This is caused by the implementation of UICallBackManager#sendUICallBack, which does nothing when the UIThread is running. The idea behind this implementation is that when the UIThread finishes ( in notifyUIThreadEnd ), the UICallBack request is answered if the Synchronizer has asyncRunnables in the queue. But in case of wake, there are no runnables. JFace uses Display#wake in ModalContext ( indirectly called through asyncExec( null ) ), where this bug prevents the ModalContext from finishing correctly (which in turn causes bug 315418).
Created attachment 180973 [details] Test case
Created attachment 181081 [details] Patch for 1.3 and HEAD With this patch, Display#wake causes the UICallBack request to unblock immediately. This should solve the problem reliably, but could still be optimized for cases where Display#wake is called multiple times in one request.
Applied patch to CVS HEAD. We should consider applying it to 1.3 maintenance branch as well.
*** Bug 317908 has been marked as a duplicate of this bug. ***
Applied the patch also to the 1.3 maintenance branch.