摘要:
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class Solution { private int start = 1; /** * 对flag的写入虽然加锁保证了线程安全,但由于读取时不是volatile所以... 阅读全文
posted @ 2019-02-22 17:10
Roni_i
阅读(643)
评论(0)
推荐(0)

浙公网安备 33010602011771号