Shirish Rai wrote:
> I have a class, say A which is runnable. When A is created it creates one
> or more threads. Thus each of these threads have a reference to the
> instance of A. Therefore when the client that created A is done using it,
> the instance of A cannot be garbage collected.
>
> Is there any way to notify the threads to exit when the thread that
> created A is done using it.
You'll have to take some explicit action at the end of the client that
creates A. That action could involve setting a boolean flag inside A or
interrupting the threads that are running A's code.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation