Bug 296822 NullProgressMonitor is not thread safe for expected usage
NullProgressMonitor.setCanceled and isCanceled access the cancelled field, but there's no synchronization. The expected use is that setCanceled is called from a thread other than the one doing the work, which polls isCanceled(), so this needs to be thread safe. Could either make these two methods synchronized or make the field volatile. Should check other progress monitor implementations too.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java
*/
	protected void finishedRun() {
		decrementNestingDepth();
		close();
	}
	/**
	 * Sets whether the progress dialog is cancelable or not.
	 * 
	 * @param cancelable
	 *            <code>true</code> if the end user can cancel this progress
	 *            dialog, and <code>false</code> if it cannot be canceled
	 */
	public void setCancelable(boolean cancelable) {
		if (cancel == null) {
			enableCancelButton = cancelable;
		} else {
			asyncSetOperationCancelButtonEnabled(cancelable);
		}
	}
	/**
	 * Helper to enable/disable Cancel button for this dialog.
	 * 
	 * @param b
	 *            <code>true</code> to enable the cancel button, and
	 *            <code>false</code> to disable it
	 * @since 3.0
	 */
	protected void setOperationCancelButtonEnabled(boolean b) {
		operationCancelableState = b;
		cancel.setEnabled(b);