java.lang.Object | +--org.eclipse.swt.widgets.Synchronizer
Unsafe: Instances of this class provide synchronization support for displays. A default instance is created automatically for each display, and this instance is sufficient for almost all applications.
IMPORTANT: Typical application code never needs to deal with this class. It is provided only to allow applications which require non-standard synchronization behavior to plug in the support they require. Subclasses which override the methods in this class must ensure that the superclass methods are invoked in their implementations
Synchronizer(Display display)
protected void
asyncExec(Runnable runnable)
run() method of the runnable to
be invoked by the user-interface thread at the next
reasonable opportunity.
protected void
syncExec(Runnable runnable)
run() method of the runnable to
be invoked by the user-interface thread at the next
reasonable opportunity.
Display display
int messageCount
RunnableLock[] messages
Object messageLock
Thread syncThread
public Synchronizer(Display display)
void addLast(RunnableLock lock)
protected void asyncExec(Runnable runnable)
run() method of the runnable to
be invoked by the user-interface thread at the next
reasonable opportunity. The caller of this method continues
to run in parallel, and is not notified when the
runnable has completed.
runnable - code to run on the user-interface thread.syncExec(java.lang.Runnable)void releaseSynchronizer()
RunnableLock removeFirst()
boolean runAsyncMessages()
protected void syncExec(Runnable runnable)
run() method of the runnable to
be invoked by the user-interface thread at the next
reasonable opportunity. The thread which calls this method
is suspended until the runnable completes.
runnable - code to run on the user-interface thread.asyncExec(java.lang.Runnable)