img
. . . . . .
Reference:
Chapter 10.
allowThreadSuspension
public final boolean allowThreadSuspension(boolean on)
This was never implemented.
uncaughtException
public final void uncaughtException(Thread t, Throwable e)
This is called whenever a thread in this group dies via an uncaught exception.
Reference:
Chapter 10.
Helper Classes from Our Extensions LibraryThe Class
Extensions.InterruptibleThread
This is one of the classes that we defined for this topic to provide a consistent interface for dealing
with certain problems. Some of those problems are artificial, a product of trying to write uniform
example code in both POSIX and Java.
exit
public void exit()
This causes the current thread to exit. It is syntactic sugar for
Thread.currentThread().stop().
Reference: Chapter 4.
Comment: We wrote this method while trying to deal with the absence of such a
function and the absence of any advice on this apparent oversight. We have
subsequently been convinced that this is the wrong way to do things and that
you should always return from the run() method (see Exiting a Thread ).
public void interrupt()
This sets the interrupt flag and causes the target thread to throw an InterruptedException if
it is blocked on (or as soon as it executes) an interruptible method or
InterruptedIOException if it is blocked on I/O.
Chapter 9.
Reference:
disableInterrupts
public void disableInterrupts()
This causes the current thread to set a flag indicating that it is not interruptible. The method
interrupt() will look at this.
Chapter 9.
Reference:
enableInterrupts
public void enableInterrupts()
Search WWH :
Custom Search
Previous Page
Multithreaded Programming with JAVA - Topic Index
Next Page
Multithreaded Programming with JAVA - Bookmarks
Home