@Override
	public void run(TaskMonitor monitor) throws CancelledException {

		final Thread t = Thread.currentThread();
		CancelledListener cancelledListener = () -> t.interrupt();
		monitor.addCancelledListener(cancelledListener);

		try {
			GhidraURLQuery.queryUrl(ghidraUrl, this, monitor);
		}
		catch (InterruptedIOException e) {
			// ignore - assume cancelled
		}
		catch (IOException e) {
			handleError("URL Access Failure", e.getMessage(), ghidraUrl, e);
		}
		finally {
			monitor.removeCancelledListener(cancelledListener);
			monitor.checkCancelled();
			done = true;
		}
	}
Determine if the task has completed its execution
@return true if done executing else false
Ghidra/Framework/Project/src/main/java/ghidra/framework/protocol/ghidra/GhidraURLQueryTask.java