tcl.lang
Class ConsoleThread

java.lang.Object
  extended by java.lang.Thread
      extended by tcl.lang.ConsoleThread
All Implemented Interfaces:
Runnable

public class ConsoleThread
extends Thread

This class implements the Console Thread: it is started by tcl.lang.Shell if the user gives no initial script to evaluate, or when the -console option is specified. The console thread loops forever, reading from the standard input, executing the user input and writing the result to the standard output.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConsoleThread(Interp i)
          Create a ConsoleThread.
 
Method Summary
 void run()
          Called by the JVM to start the execution of the console thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsoleThread

public ConsoleThread(Interp i)
Create a ConsoleThread.

Method Detail

run

public void run()
Called by the JVM to start the execution of the console thread. It loops forever to handle user inputs. Results: None. Side effects: This method never returns. During its execution, some TclObjects may be locked inside the historyObjs vector. Remember to free them at "appropriate" times!

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2015. All rights reserved.