This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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.
 
 
subject: Doubts on output of Thread Synchronization
 
Similar Threads
thread's
Thread class
synchronized is not working. why ?
Basics of Thread and Synchronization
Pls explain the program