You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2018. It is now read-only.
When synchronised is used in a multi threaded context there will be always 1 thread in which you can perform the task without synchronisation, hence it might be better through put to store the most likely accessed in a variable called safeThread and check this before entering synchronisation block. If it is the safe thread execute without synchronized wrapper otherwise use the wrapper.
The text was updated successfully, but these errors were encountered:
When synchronised is used in a multi threaded context there will be always 1 thread in which you can perform the task without synchronisation, hence it might be better through put to store the most likely accessed in a variable called
safeThread
and check this before entering synchronisation block. If it is the safe thread execute without synchronized wrapper otherwise use the wrapper.The text was updated successfully, but these errors were encountered: