JNodeOS v1.2.0 API

edu.utah.janos.tests
Class WatchDog

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.utah.janos.tests.WatchDog

public class WatchDog
extends java.lang.Thread

A simple watch dog thread. It waits for a given length of time and then interrupts the target thread, unless it gets interrupted beforehand.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WatchDog(long ti, java.lang.Thread th)
          Construct a watch dog thread that watches a thread for ti time
 
Method Summary
 void run()
          Sleep for time milliseconds and then call interrupt on thread if we aren't interrupted before hand.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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
 

Constructor Detail

WatchDog

public WatchDog(long ti,
                java.lang.Thread th)
Construct a watch dog thread that watches a thread for ti time
Parameters:
ti - The length of time to sleep before interrupting the thread
th - The thread to watch
Method Detail

run

public void run()
Sleep for time milliseconds and then call interrupt on thread if we aren't interrupted before hand. An interrupt called on our thread will cause make the thread quit quietly.
Overrides:
run in class java.lang.Thread

JNodeOS v1.2.0 API

This documentation is Copyright (C) 1998-2002 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project web site: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002