• Post Reply Bookmark Topic Watch Topic
  • New Topic

need further clarification  RSS feed

 
Rahul Kakkar
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i somewhat understand what the following means.. but could someone please elaborate, preferably with an example?

A class uses synchronization along with wait(), notify() or notifyAll() on itself (the this reference). Client classes that use this class, may, in addition, use an instance of this class as a synchronizing object. Because two classes are using the same object for synchronization, Multithread correctness is suspect. you should not synchronize nor call semaphore methods on a public reference. Consider using a internal private member variable to control synchronization.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!