Dear All,
I know that Thread.stop() is depricated because of deadlick problems. And the alternate to this is givenm normally as
public void run(){
while(isStop==false){
//do blah-blah
}
}
public void stopThread(){
isStop=false;
}
But what i want is to stop the thread immidealty when i call the stop method. e.g my run is
public void run(){
//do blah 1
//do blah 2
//do blah 3
//do blah 4
}
So should i check if stop isStop=false after every blah.. or there is some alternate? If answer is no, then Sun is doin gr8 injustice with me cause my run method is too large containing a lot of sleeps and lot of method calls.
Regards
Sandeep Jindal
I know that Thread.stop() is depricated because of deadlick problems. And the alternate to this is givenm normally as
public void run(){
while(isStop==false){
//do blah-blah
}
}
public void stopThread(){
isStop=false;
}
But what i want is to stop the thread immidealty when i call the stop method. e.g my run is
public void run(){
//do blah 1
//do blah 2
//do blah 3
//do blah 4
}
So should i check if stop isStop=false after every blah.. or there is some alternate? If answer is no, then Sun is doin gr8 injustice with me cause my run method is too large containing a lot of sleeps and lot of method calls.
Regards
Sandeep Jindal