eg:原子性操作
public void Test() {
AtomicReference<Double> a = new AtomicReference<>(0.0);
for (int i=0;i<5;i++) {
a.set(CurrencyUtil.add(a.get(), i));
}
System.out.println("a的最终值为:" + a);
}
//最终为:0+1+2+3+4=10