aspose file tools*
The moose likes Threads and Synchronization and the fly likes Question on Synchronization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Question on Synchronization" Watch "Question on Synchronization" New topic
Author

Question on Synchronization

Rajesh Hegde
Ranch Hand

Joined: Sep 15, 2000
Posts: 112
If a thread enters an object's monitor, can some other thread access the Non-Synchronized method of the same object?
rajesh
Jerry Pulley
Ranch Hand

Joined: Sep 19, 2000
Posts: 221
Rajesh,
Yes. All of the code that's synchronized on one monitor object is protected from access by more than one thread at a time. Code that's not synchronized, or is sync'ed on another monitor object, may be accessed freely.
Jerry
Marcela Blei
Ranch Hand

Joined: Jun 28, 2000
Posts: 477
Rajesh:
I agree with Jerry.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Synchronization