synchronized
-
synchronizedStaticPL/JAVA 2020. 2. 27. 00:43
1. Overview Sometimes, you only want to prevent multiple thread access to part of the code inside a method instead of the entire method. The section of code you want to isolate this way is called a critical section and is also created using the synchronized keyword. 2. Critical section It this way, we can really achieve atomicity for any number of distinct operations without worrying about concu..