The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2002



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.


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.


Sponsored Links

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