I am working in java android platform. I am creating a child thread from main thread. I want to stop child thread as my requirments. My child thread has simple function which doesn't have any loop. I want to kill child thread and free resources it is using, whenever I want. I searched for it and I found inturrupt() function.my thread is:

public class childThread implements Runnable{
  public void run() {
     firstFunction();
     secondFunction();
    }
}


Main thread has this code to start above thread:

Thread tChild;
tChild = new Thread(new childThread(), "Child Thread");
tChild.start();


my run() function is calling function like this. How to I use inturrupt() in this? Please tell me any other way to kill child thread and deallocating its resources. Thank you.


Question: Error using Grass v.net
Answer: For the record: the problem cannot be solved in GRASS 6 for Windows7 (see https://trac.osgeo.org/grass/ticket/1855#comment:3).

But it is working fine in GRASS 7 which will be released this year. To work with it right away, nightly snapshots for Windows are available here: http://wingrass.fsv.cvut.cz/grass70/