ITPub博客

首页 > 应用开发 > > 帮忙解释一下下面页面中的内容。有关线程安全、双检测的

帮忙解释一下下面页面中的内容。有关线程安全、双检测的

作者:cjk 时间:2019-08-27 13:47:10 0 删除 编辑

Given the above code, writes that initialize the Foo instance could be delayed until the write of the instance value, thus creating the possibility that the instance returns an object in an uninitialized state.

In order to avoid this, the instance value must be made volatile. 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4715/viewspace-3143110/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-29

  • 博文量
    181
  • 访问量
    1134