Bug 164343 [DataBinding] Realm needs consistent Exception handling strategy
tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/observable/LockRealm.java
private boolean lockAcquired;
	public LockRealm() {
		queue = new LinkedList();
		lock = Job.getJobManager().newLock();
		job = new Job("Lock Realm Job") {
			protected IStatus run(IProgressMonitor monitor) {
				for (Runnable runnable; (runnable = dequeue()) != null;) {
					acquireLock();
					try {
						runnable.run();
					} finally {
						releaseLock();
					}
				}
				return Status.OK_STATUS;
			}
		};
		job.setSystem(true);
	}
	protected void syncExec(Runnable runnable) {
		acquireLock();
		try {
			runnable.run();
		} finally {
			releaseLock();
		}
	}
	public void asyncExec(Runnable runnable) {
		enqueue(runnable);
		job.schedule();