@Override
	public final void monitoredRun(TaskMonitor monitor) {
		taskMonitor = monitor;

		// this will be removed from SystemUtilities in Task.run() after the task is finished
		TaskUtilities.addTrackedTask(this, monitor);

		try {
			run(monitor);
			isCancelled = monitor.isCancelled();
		}
		catch (CancelledException e) {
			Msg.debug(this, "Task cancelled: " + getTaskTitle());
			isCancelled = true;
		}
		catch (Throwable t) {
			Msg.showError(this, null, "Task Error",
				getTaskTitle() + " - Uncaught Exception: " + t.toString(), t);
		}
		finally {
			TaskUtilities.removeTrackedTask(this);
			taskMonitor = TaskMonitor.DUMMY;
		}

		notifyTaskListeners(isCancelled);
	}
When an object implementing interface <code>Runnable</code> is used to create a thread,
starting the thread causes the object's <code>run</code> method to be called in that
separately executing thread.

@param monitor the task monitor
Ghidra/Framework/Gui/src/main/java/ghidra/util/task/Task.java