@Override
	public void run(TaskMonitor monitor) {

		taskMonitor.initialize(programsToOpen.size());

		for (ProgramLocator locator : programsToOpen) {
			if (taskMonitor.isCancelled()) {
				return;
			}
			Program program = programOpener.openProgram(locator, monitor);
			if (program != null) {
				openedPrograms.add(new OpenProgramRequest(program, locator, consumer));
			}
			taskMonitor.incrementProgress(1);
		}
	}
Get the first successful open program request
@return first successful open program request or null if none
Ghidra/Features/Base/src/main/java/ghidra/app/util/task/OpenProgramTask.java