I'm stuck against a problem and I'm not sure which way to take,

example :

Thread 1
Thread 2
Thread 3
ThreadGroup 2543543 (random number)
       Reader Thread
           AsyncInputStream Thread
       Writer Thread

ThreadGroup 32453453 (random number)
       Reader Thread
           AsyncInputStream Thread
       Writer Thread

I need to cancel ThreadGroup 32453453 from Thread 2, how do I go about doing this. I've tried using the interrupt method on say the reader thread without any luck (isinterrupt() doesnt return true for some reason). I'm still learing java, could I set a boolean flag in for the reader thread in Thread 2 , for example

    Thread 2 Code
              [Reader Thread,32453453].timetoquit=true

     Reader Thread Code
              If [Reader Thread,32453453].timetoquit=true {
                          ...bla bla
                }

Also if I destroy all threads from a threadgroup using the destroy() method would this clean up afterwards (release memory used) ???

Thanks

Ron
 
 

Reply via email to