public static Future<IOResult> consume(InputStream is,
			Consumer<String> lineConsumer) {

		lineConsumer = Dummy.ifNull(lineConsumer);

		Throwable inception = ReflectionUtilities.filterJavaThrowable(
			ReflectionUtilities.createThrowableWithStackOlderThan(ProcessConsumer.class));

		GThreadPool pool = GThreadPool.getSharedThreadPool(IOResult.THREAD_POOL_NAME);
		IOResult runnable = new IOResult(inception, is);
		runnable.setConsumer(lineConsumer);
		Future<IOResult> future = pool.submit(runnable, runnable);
		return future;
	}
Read the given input stream line-by-line.

<p>If you wish to get all output after all reading is done you can call the blocking 
operation {@link Future#get()}.

@param is the input stream
@param lineConsumer the line consumer; may be null
@return the future that will be complete when all lines are read
Ghidra/Framework/Generic/src/main/java/generic/concurrent/io/ProcessConsumer.java