- confine mutable data to a single thread.
- when multiple threads share mutable data, each thread that reads or writes the data must perform synchronization.
- synchronization has no effect unless both read and write
- operations are synchronized。
- Do not use Thread.stop. use boolean control the thread.
- To avoid liveness and safety failures, never cede control to the client within a synchronized method or block.