Package org.fife.rsta.ac.js
Class JsHinter.StreamReaderThread
java.lang.Object
java.lang.Thread
org.fife.rsta.ac.js.JsHinter.StreamReaderThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
JsHinter
A thread dedicated to reading either the stdout or stderr stream of
an external process. These streams are read in a dedicated thread
to ensure they are consumed appropriately to prevent deadlock. This
idea was taken from
this JavaWorld article.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the output read from the stream.voidrun()Continually reads from the output stream until this thread is interrupted.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
r
-
buffer
-
-
Constructor Details
-
StreamReaderThread
Constructor.- Parameters:
in- The stream (stdout or stderr) to read from.
-
-
Method Details