org.starhope.appius.game
Class Charon

java.lang.Object
  extended by java.lang.Thread
      extended by org.starhope.appius.game.Charon
All Implemented Interfaces:
Runnable

public class Charon
extends Thread

Charon is the reaper for zombie threads. WRITEME

Author:
brpocock

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  long reaperSleep
          The time to sleep between passes reaping the zombie threads
private  ConcurrentSkipListSet<Thread> restlessDead
          The set of threads who might be zombies
private  long threadJoinTimeout
          How long to wait for a zombie to join us before passing it over for this reaper pass
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Charon()
           
 
Method Summary
 void addZombie(Thread t)
          Add a thread to the pool to be checked to reaping periodically
 void run()
          This is an overriding method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reaperSleep

private final long reaperSleep
The time to sleep between passes reaping the zombie threads


restlessDead

private final ConcurrentSkipListSet<Thread> restlessDead
The set of threads who might be zombies


threadJoinTimeout

private final long threadJoinTimeout
How long to wait for a zombie to join us before passing it over for this reaper pass

Constructor Detail

Charon

public Charon()
Method Detail

addZombie

public void addZombie(Thread t)
Add a thread to the pool to be checked to reaping periodically

Parameters:
t - The zombie thread to be checked for reaping

run

public void run()
This is an overriding method.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.run()