public static synchronized ShutdownHook addShutdownHook(Runnable r, ShutdownPriority priority) {

		ShutdownHook hook = new ShutdownHook(r, priority.getPriority());
		hooks.add(hook);

		installHook();

		return hook;
	}
Install a shutdown hook at the specified priority.  If the hook has no specific 
priority or sensitivity to when it runs, the standard Java Runtime shutdown hook
mechanism should be used.
Hooks with a higher priority value will run first
@param r shutdown hook runnable
@param priority relative priority
Ghidra/Framework/Generic/src/main/java/ghidra/framework/ShutdownHookRegistry.java