Synchronized block retains the lock for comparatively smaller period of time as compared to synchronized methods, at least in most of the cases. So, try to use synchronized blocks as long as it doesn’t affect the business requirement.
Wednesday, May 14, 2008
Synchronized Block vs Synchronized Method
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment