This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Doubts on output of Thread Synchronization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Doubts on output of Thread Synchronization" Watch "Doubts on output of Thread Synchronization" New topic
Author

Doubts on output of Thread Synchronization

Kamal Tripathi
Ranch Hand

Joined: Oct 02, 2008
Posts: 86
I have a rookie question on thread synchronization.



Output
// main didn't wait for OB2 to finish ??

Now most of it makes sense however towards the end lines 8-12 create doubt. I ran the class file twice but both of the times nearly same result, main doesn't join to unfinished threads.

What could be the explanation here?




Kamal Tripathi
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubts on output of Thread Synchronization
 
Similar Threads
Basics of Thread and Synchronization
Pls explain the program
Thread class
synchronized is not working. why ?
thread's