Synchronizer

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. <p> <b>IMPORTANT:</b> Typical application code <em>never</em> 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. <em>Subclasses which override the methods in this class must ensure that the superclass methods are invoked in their implementations</em> </p>

@see Display#setSynchronizer @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

class Synchronizer {
Display display;
int messageCount;
RunnableLock[] messages;
Object messageLock;
Thread syncThread;
int GROW_SIZE;
int MESSAGE_LIMIT;
}

Constructors

this
this(Display display)

Constructs a new instance of this class.

Members

Functions

asyncExec
void asyncExec(Runnable runnable)

Causes the <code>run()</code> 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.

syncExec
void syncExec(Runnable runnable)

Causes the <code>run()</code> 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.

Meta