拼写错的时候... 这个在 《 Java 并发编程实战》写得很清楚了 You can use volatile variables only when all the following criteria are met: • Writes to the variable do not depend on its current value, or you can ensure that only a single thread ever updates the value; • The variable does not participate in invariants with other state variables; and • Locking is not required for any other reason while the variable is being accessed.