Wednesday, June 24, 2009

How to Determine When a Thread Has Finished


// Create and start a thread
Thread thread = new SampleThread();
thread.start();

if (thread.isAlive()) {
// Thread is still running
} else {
// Thread is finished
}

0 comments:

 

Sample Java Codes Copyright © 2008 Green Scrapbook Diary Designed by SimplyWP | Made free by Scrapbooking Software | Bloggerized by Ipiet Notez