Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

thread usage........problem.  RSS feed

 
Sachindra Pratap
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Report post to moderator
-----------code------------------------

t1.start();
t2.start();
t3.start();

////////

thread t1{
public void run(){
//fires some command to
........//instruction send to server
t1.stop();
}
}

thread t2{
public void run(){
while(true){
t1.join();
if(callFlag){//callFlag value set to true only
//when requiste response is read from server through our client prog.
//which is reply of the instrunction send in thread t1;
......
callFlag=false;
t2.stop();
}
}}
}

thread t3{
public void run(){
t2.join();
.....
......
}
}

//Well problem i am facing is suppose the desired response never comes
the callFlag is never set to true;
so the thread t2 never stops .

So please help me out.


regards
Sachindra
 
Henry Wong
author
Sheriff
Posts: 22831
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate topic. Original topic at....

http://www.coderanch.com/t/234334/threads/java/thread-excution

This topic will be closed.

Henry
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!