第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Java集合 modCount為什么不用volatile修飾?

Java集合 modCount為什么不用volatile修飾?

犯罪嫌疑人X 2019-04-26 18:15:55
2個線程 訪問一個list 其中一個remove操作了 另一個在迭代 假如不用vol修飾 那么在迭代的那個線程可能感知不到modcount的變化啊甚至于說官方認為有volatile是一個BUG?https://bugs.java.com/bugdata...
查看完整描述

2 回答

?
慕容3067478

TA貢獻1773條經(jīng)驗 獲得超3個贊

Since the modCount mechanism comes with no guarantees, and users of

single-threaded collections do not expect to pay the (high) price

of a volatile write on every modification operation, the volatile

modifier should be removed.

Description里都寫的那么清楚了 還有什么可問的?


查看完整回答
反對 回復 2019-05-19
  • 2 回答
  • 0 關注
  • 561 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號