private void stopPreSave(boolean endUpdate) {

		PreSaveTask task;
		synchronized (preSaveLock) {
			task = preSaveTask;
			preSaveTask = null;
		}
		if (task != null) {
			task.cancelTask();
		}

		synchronized (this) {
			// If preSaveFile is null and !preSaveFailed - we were unsuccessful at terminating the pre-save
			if (endUpdate && bfMgr != null && (preSaveFailed || preSaveFile != null)) {

				// Update is ended when we can no longer perform a save
				bfMgr.updateEnded(checkinId);
			}

			// Remove pre-save file if it exists
			if (preSaveFile != null) {
				preSaveFile.delete();
				preSaveFile = null;
			}
		}
	}
Terminate background save if it is running.
This may be unsuccessful if this thread is interupted.
@param endUpdate if true and pre-save successfully terminated, 
notify buffer file manager that update has ended.
Ghidra/Framework/DB/src/main/java/db/buffers/LocalManagedBufferFile.java