> yourThreadOb.stop() should do it. If you have overriden stop() to halt your
> thread that is.

This is not a good idea.

   * you can't override stop(), it's final
   * you shouldn't use stop() at all. Excerpt from Java 1.2 docs of
     java.lang.Thread:

public final void stop()


         Deprecated. This method is inherently unsafe. Stopping a thread with
         Thread.stop causes it to unlock all of the monitors that it has locked
     (as a
         natural consequence of the unchecked ThreadDeath exception
         propagating up the stack). If any of the objects previously protected
     by
         these monitors were in an inconsistent state, the damaged objects
     become
         visible to other threads, potentially resulting in arbitrary behavior.
         Many uses of stop should be replaced by code that simply modifies some
         variable to indicate that the target thread should stop running. The
         target thread should check this variable regularly, and return from its

         run method in an orderly fashion if the variable indicates that it is
     to
         stop running. If the target thread waits for long periods (on a
     condition
         variable, for example), the interrupt method should be used to
         interrupt the wait.

So that's the way to do it.

-hendrik
- - - - - - - - - - - - - - - - - - - - - - - - - - -
  tagtraum industries      http://www.tagtraum.com/
  jo!                 small&smart 2.1 servletengine
  Java Server & Servlets    The German servlet book
  The WebApp Framework        http://www.webapp.de/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to