Bug 164343 [DataBinding] Realm needs consistent Exception handling strategy
bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Realm.java
SyncRunnable(Runnable runnable) {
			this.runnable = runnable;
		}
		public void run() {
			runnable.run();
			synchronized (this) {
				hasRun = true;
				this.notifyAll();
			}
		}
	}
	/**
	 * Sets the provided <code>realm</code> as the default for the duration of
	 * {@link Runnable#run()} and resets the previous realm after completion.
	 * Note that this will not set the given realm as the current realm.
	 * 
	 * @param realm
	 * @param runnable
	 */
	public static void runWithDefault(Realm realm, Runnable runnable) {
		Realm oldRealm = Realm.getDefault();
		try {
			defaultRealm.set(realm);
			runnable.run();
		} finally {
			defaultRealm.set(oldRealm);
		}
	}
}