安全牛 phpMyAdmin漏洞安全防范
//数量自增1:线程安全(执行n次,每次都是1000)
atomicInteger.incrementAndGet();
//用户年龄自增1:线程不安全(执行n次,每次结果可能不一样)
member.setAge(member.getAge() + 1);
//当前线程执行完,计数器减一
countDownLatch2.countDown();
});
countDownLatch.countDown();