# Class UISynchronizer

java.lang.Object
org.eclipse.swt.widgets.Synchronizer
org.eclipse.ui.internal.UISynchronizer

public class UISynchronizer extends Synchronizer

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`isStarting`
Indicates that the UI is in startup mode and that no non-workbench runnables should be invoked.
`protected UILockListener`
`lockListener`
`static final ThreadLocal<Boolean>`
`overrideThread`
`protected List<Runnable>`
`pendingStartup`
List of non-workbench Runnables that need executing at some point in the future
`static final ThreadLocal<Boolean>`
`startupThread`
Setting this variable to the value `Boolean.TRUE` will allow a thread to execute code during the startup sequence.

## Constructor Summary

Constructors
Constructor
Description
`UISynchronizer(Display display, UILockListener lock)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`asyncExec(Runnable runnable)`
Causes the `run()` method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity.
`void`
`started()`
`void`
`syncExec(Runnable runnable)`
Causes the `run()` method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### lockListener

protected UILockListener lockListener

### isStarting

protected boolean isStarting
Indicates that the UI is in startup mode and that no non-workbench runnables should be invoked.

### pendingStartup

protected List<Runnable> pendingStartup
List of non-workbench Runnables that need executing at some point in the future

### startupThread

public static final ThreadLocal<Boolean> startupThread
Setting this variable to the value `Boolean.TRUE` will allow a thread to execute code during the startup sequence.

### overrideThread

public static final ThreadLocal<Boolean> overrideThread

## Constructor Details

### UISynchronizer

public UISynchronizer(Display display, UILockListener lock)

## Method Details

### started

public void started()

### asyncExec

protected void asyncExec(Runnable runnable)
Description copied from class: `Synchronizer`
Causes the `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.

Overrides:
  `asyncExec` in class `Synchronizer`
Parameters:
  `runnable` - code to run on the user-interface thread.
See Also:
  - `Synchronizer.syncExec(Runnable)`

### syncExec

public void syncExec(Runnable runnable)
Description copied from class: `Synchronizer`
Causes the `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.

Overrides:
  `syncExec` in class `Synchronizer`
Parameters:
  `runnable` - code to run on the user-interface thread.
See Also:
  - `Synchronizer.asyncExec(Runnable)`