java and contracting,

Action AuomicInteger high concurrency, ordering, atomicity

 

 

 

 Use compareandset set cpu-level lock, if it is 0, it can acquire the lock, if it is 1, it throws an exception, the end of the thread, and only allows the use of threads to grab lock unlock

 

AutomicBoolean

 

 Alternatively volitic, while values ​​are placed in a main eat

Guess you like

Origin www.cnblogs.com/zj-xu/p/11939075.html