Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubts on output of Thread Synchronization

 
Kamal Tripathi
Ranch Hand
Posts: 86
  • 0
  • 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?



 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic