public synchronized void doPrepare() {
public void doPrepare() {  if (isWorking()) { if (Debug.debugging("layer")) { Debug.output(getName() + " layer already working in prepare(), cancelling"); } setCancelled(true); return; }
    public synchronized void doPrepare() {        // If there isn't a worker thread working on a projection        // changed or other doPrepare call, then create a thread that        // will do the real work. If there is a thread working on        // this, then set the cancelled flag in the layer.        if (layerWorker == null) {            layerWorker = new LayerWorker();            layerWorker.start();        } else {            if (Debug.debugging("layer")) {                Debug.output(getName() + " layer already working in prepare(), cancelling");            }            setCancelled(true);        }    }