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>

Constructors

this
this(Display display)

Constructs a new instance of this class.

Members

Functions

addLast
void addLast(RunnableLock lock)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

getMessageCount
int getMessageCount()
Undocumented in source. Be warned that the author may not have intended to support it.
releaseSynchronizer
void releaseSynchronizer()
Undocumented in source. Be warned that the author may not have intended to support it.
removeFirst
RunnableLock removeFirst()
Undocumented in source. Be warned that the author may not have intended to support it.
runAsyncMessages
bool runAsyncMessages()
Undocumented in source. Be warned that the author may not have intended to support it.
runAsyncMessages
bool runAsyncMessages(bool all)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

Static variables

GROW_SIZE
int GROW_SIZE;
Undocumented in source.
MESSAGE_LIMIT
int MESSAGE_LIMIT;
Undocumented in source.

Variables

display
Display display;
Undocumented in source.
messageCount
int messageCount;
Undocumented in source.
messageLock
Object messageLock;
Undocumented in source.
messages
RunnableLock[] messages;
Undocumented in source.
syncThread
Thread syncThread;
Undocumented in source.

Meta