Click here to Skip to main content
15,915,508 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what does this mean
if(thrdUpdate != null){
while(thrdUpdate.isAlive()){}
}
Posted
Comments
BotCar 16-Aug-13 3:53am    
Have you looked at the API yet?
http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#isAlive%28%29
pasztorpisti 16-Aug-13 5:32am    
In plain english: "If the thread exists and it is running then lets busy wait until it terminates". Busy waiting is evil and its use is quite limited. This is not the right place for a busy wait, that piece of code has some room for improvement... It would probably be better to use this:
if (thrdUpdate != null) {
thrdUpdate.join();
thrdUpdate = null;
}

1 solution

 
Share this answer
 
Comments
ridoy 16-Aug-13 4:53am    
5ed!
Thanks a lot ridoy... :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900