Unlocked, biased locking, lightweight locks, what is the difference between heavy lock?
Know his principle, I use a synchronized will improve performance
CodePudding user response:
Lock is the largest use to synchronous operation, such as you and others call this added a synchronized method at the same time, if you call first, then others will need to wait for your call to access, otherwise he is waiting for you to complete,If you want to pull on the performance, it is worse than no, but if for the accuracy and security of the data, etc., as needed,
CodePudding user response:
Can brag to useCodePudding user response:
General development, interviews are commonCodePudding user response:
Will not improve performance, but can make you less on the pit