This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes calling synchronized methods of the object simultaneouly. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "calling synchronized methods of the object simultaneouly." Watch "calling synchronized methods of the object simultaneouly." New topic
Author

calling synchronized methods of the object simultaneouly.

prasanth chiru
Greenhorn

Joined: Mar 14, 2004
Posts: 16
Hi,
In my object I am having many synchronized methods. If a thread is calling one synchronized method, can any other thread call some other synchronized method of the same object at the same time.
If anybody knows about it, please help me.
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1831
NO a thread cannot call any of the synchronized blocks of an Object once it is locked by another thread either through a synchrnoized block or a synchronized method. It can however call any of the methods that are not synchronized.
prasanth chiru
Greenhorn

Joined: Mar 14, 2004
Posts: 16
Hi rahul,
Thankyou much for neat explaination.
prasanth chiru
Greenhorn

Joined: Mar 14, 2004
Posts: 16
Hi rahul,
Thankyou very much for the clear explaination.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: calling synchronized methods of the object simultaneouly.
 
Similar Threads
Synchronization
Thread question from Marcus' exam#2
Current thread not owner
Thread behavior with synchronized method
semantic of synchronization