@Override
	public R process(Function f, TaskMonitor monitor) throws Exception {

		if (monitor.isCancelled()) {
			return null;
		}

		DecompInterface decompiler = null;
		DecompileResults decompileResults;
		try {
			decompiler = pool.get();
			monitor.setMessage("Decompiling " + f.getName());
			decompileResults = decompiler.decompileFunction(f, timeout, monitor);
		}
		finally {
			if (decompiler != null) {
				pool.release(decompiler);
			}
		}

		R r = process(decompileResults, monitor);
		return r;

	}
This is called when a function is decompiled.

@param results the decompiled results
@param monitor the task monitor
@return the client result
@throws Exception if there is any issue processing the given results
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/parallel/DecompilerCallback.java