|
-
Thread - Join method
When we run a java program, JVM will create the main thread in which the main function will be called. Inside the main thread we can have child thread. Now for the main thread to terminate the child thread must first be dead. To know if the child thread is alive or not we can do the following.
t1.join();
t1.isAlive() // returns a boolean value
Im assuming t1 as a thread object. Now how does the join() method play a role in finding out the status of the child thread. Also how does it tell the main thread that the child thread is all dead?. Besides that without the syntax t1.join(), the t1.isAlive() statement will result in an error. So what does the join() method do to the t1 thread object?.
Last edited by solomon_13000; 06-18-2009 at 06:10 AM.
Similar Threads
-
By billysdomain in forum C++
Replies: 6
Last Post: 03-13-2009, 07:43 AM
-
Replies: 1
Last Post: 06-13-2008, 08:11 AM
-
Replies: 1
Last Post: 09-24-2002, 12:31 AM
-
Replies: 2
Last Post: 03-28-2002, 12:12 PM
-
Replies: 2
Last Post: 10-27-2000, 03:07 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks