- One thread may interrupt another thread from the point of remote
class where the thread was created.
- The set of functions were used in the examples shown below.
- at remote class: thread_object.interruopt();
- in action class: Thread.currentThread().isInterrupted()
- When interrupted a thread that had been in sleep mode, catch block
in try-catch exception set, will display the message "java.lang.InterruptedException:
sleep interrupted" , the function Thread.currentThread().isInterrupted()
will report that the thread was stopped.
Some functions like destroy, suspended etc, are deprecated due to some
safe-execution issues, the details can be read at this location. http://java.sun.com/j2se/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html
|