Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubts on output of Thread Synchronization

 
Kamal Tripathi
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic