Forums Register Login

calling synchronized methods of the object simultaneouly.

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Hi rahul,
Thankyou much for neat explaination.
+Pie Number of slices to send: Send
Hi rahul,
Thankyou very much for the clear explaination.
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 883 times.
Similar Threads
Thread behavior with synchronized method
semantic of synchronization
Current thread not owner
Thread question from Marcus' exam#2
Synchronization
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:30:57.