void waitForTask(TaskMonitor taskMonitor) throws CancelledException {
			if (taskThread.isAlive()) {
				if (taskMonitor != null) {
					synchronized (preSaveLock) {
						taskMonitor.initialize(maxIndex);
						taskMonitor.setProgress(curIndex);
						this.monitor = taskMonitor;
						this.monitorThread = Thread.currentThread();
					}
				}
				try {
					taskThread.join();
				}
				catch (InterruptedException e) {
					// ignore
				}
				if (taskMonitor != null) {
					taskMonitor.checkCancelled();
				}
			}
		}
<code>PreSaveTask</code> facilitates the pre-saving a copy of this buffer 
file for update use by a BufferMgr.
Ghidra/Framework/DB/src/main/java/db/buffers/LocalManagedBufferFile.java