@Override
	public void run() {
		try (BufferedReader reader = new BufferedReader(new InputStreamReader(consoleStdin))) {
			String line;
			while (!shutdownRequested.get() && (line = reader.readLine()) != null) {

				// Execute the line in a new thread
				jythonExecutionThread =
					new JythonPluginExecutionThread(plugin, line, moreInputWanted);
				jythonExecutionThread.start();

				try {
					// Wait for the execution to finish
					jythonExecutionThread.join();
				}
				catch (InterruptedException ie) {
					// Hey we're back... a little earlier than expected, but there must be a reason. 
					// So we'll go quietly.
				}

				// Set the prompt appropriately
				plugin.getConsole()
						.setPrompt(
							moreInputWanted.get() ? plugin.getInterpreter().getSecondaryPrompt()
									: plugin.getInterpreter().getPrimaryPrompt());
			}
		}
		catch (IOException e) {
			Msg.error(JythonPluginInputThread.class,
				"Internal error reading commands from interpreter console.  Please reset the interpreter.",
				e);
		}
	}
Gets the last jython plugin execution thread that ran.

@return The last jython plugin execution thread that ran.  Could be null if one never ran.
Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPluginInputThread.java