The first condition disqualifies volatile variables from being used as thread-safe counters.
第一个条件的限制使volatile变量不能用作线程安全计数器。
Do not use volatile variables. Lock your object or fields instead to guarantee deterministic and thread-safe Access.
不要使用不稳定变量。锁定对象或域,而不是去保证决定性和线程安全访问。
Do not use volatile variables. Lock your object or fields instead to guarantee deterministic and thread-safe Access.
不要使用不稳定变量。锁定对象或域,而不是去保证决定性和线程安全访问。
应用推荐