The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Synch Method

Posted by Paul Walia (jinhotty) on February 22, 2002 at 3:17 PM

Yes it will work fine.. when you synch... the method it locks the invoking object actually.. which you must deal with the same object inorder to ensure locking.. creat one Object for the class with synch method and use that object by other threads also your synch will work just fine.. and also use wait and notify, on notification the waiting thread is activated.





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us