One, synchronized synchronization method
1. The variables within the method are thread-safe
2. Instance variables non-thread safe
3. Multiple Objects multiple locks
4.synchronized method and Lock object
5. Dirty Reading
6.synchronized Lock Punch in
7. Abnormal, lock automatic release
8. Synchronization does not have inheritance
Second, synchronized synchronous statement block
Disadvantages of the 1.synchronized approach
Use of 2.synchronized synchronous code blocks
3. Use synchronous code block to solve the disadvantage of synchronization
4. Half asynchronous, half synchronous
Synchronization between 5.synchronized code blocks
6. Verify that the synchronization synchronized (this) code block is locking the current object
7. Use any object as a monitor
8.3 Conclusions of refinement verification
9. Static sync synchronized and synchronized (this) code block
10. Constant pool properties for data type string
11. Synchronous Synchronized method infinite wait and solve
12. Multi-threaded deadlock
13. Built-in classes and static built-in classes
14. Built-in classes and synchronization: Experiment 1
15. Built-in classes and synchronization: Experiment 2
16. Change of lock Object
Third, the volatile keyword
1. Keyword volatile and dead loop
2. Resolve the synchronization cycle
3. Resolving Asynchronous Dead Loops
4.volatile Non-atomic properties
5. Using atomic classes for i++ operations
6. Atomic classes are not completely safe.
7.synchronized code block with volatile sync function
Java multithreaded Programming (ii) Concurrent access to objects and variables