Sponsored Link •
|
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:
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
|