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/wizard/ProgressMonitorPart.java
* @param layout The SWT grid bag layout used by the part. A client
     * can supply the layout to control how the progress monitor part
     * is layed out. If null is passed the part uses its default layout.
     * @param progressIndicatorHeight The height of the progress indicator in pixel.
     */
    public ProgressMonitorPart(Composite parent, Layout layout,
            int progressIndicatorHeight) {
        super(parent, SWT.NONE);
        initialize(layout, progressIndicatorHeight);
    }
    /**
     * Attaches the progress monitor part to the given cancel
     * component.
     * @param cancelComponent the control whose selection will
     * trigger a cancel
     */
    public void attachToCancelComponent(Control cancelComponent) {
        Assert.isNotNull(cancelComponent);
        fCancelComponent = cancelComponent;
        fCancelComponent.addListener(SWT.Selection, fCancelListener);
    }
    /**
     * Implements <code>IProgressMonitor.beginTask</code>.
     * @see IProgressMonitor#beginTask(java.lang.String, int)
     */
    public void beginTask(String name, int totalWork) {
        fTaskName = name;
        updateLabel();
        if (totalWork == IProgressMonitor.UNKNOWN || totalWork == 0) {
            fProgressIndicator.beginAnimatedTask();