Double checked locking in Android

后端 未结 2 882
情深已故
情深已故 2021-02-01 20:23

According to many, the somewhat common Double-Checked Locking idiom is broken for java unless you\'re running 1.5 or later and use the volatile keyword.

A b

2条回答
  •  耶瑟儿~
    2021-02-01 20:53

    The answer to this question implies that the memory models should be the same, and that the new double checked locking idiom will work.

提交回复
热议问题