Hi,
And even for daemon threads, it'd be nice of you to shut them down
explicitly: myThread.interrupt() (and myThread's impl catches
InterruptedException and exits the run method) and myThread = null.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Tim Funk [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 09, 2004 9:17 PM
>To: Tomcat Users List
>Subject: Re: Spawn New Thread
>
>If the thread is associated with a servlet. It would be best to use the
>destroy method of the servlet to stop the thread.
>
>-Tim
>
>Corey Baswell wrote:
>
>> Hello,
>>
>> I'm trying to figure out what the proper way for spawning a new
thread
>> in Tomcat is.  I can create a new thread when my servlet is first
>> loaded, but it does not get closed down when tomcat does. Is there
>> anyway to register a new thread with Tomcat so that it will get
closed
>> when Tomcat goes down?
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to