• 请不要在回答技术问题时复制粘贴 AI 生成的内容
hlobo
V2EX  ›  程序员

[求助] 大佬们,这个类为什么是非线程安全的

  •  
  •   hlobo · Aug 18, 2021 · 1461 views
    This topic created in 1755 days ago, the information mentioned may be changed or developed.

    求助,这个类不是线程安全的嘛

    如图,holder 类中,n 变量是私有的,只有构造方法可以给它赋值,为什么是非线程安全的呢?

    图像

    在 idea 中,提示 always false

    16292895942213

    不明白不明白,有没有大佬给开开路。

    SmiteChow
        1
    SmiteChow  
       Aug 19, 2021
    仔细看看 3-14
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3668 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 10:38 · PVG 18:38 · LAX 03:38 · JFK 06:38
    ♥ Do have faith in what you're doing.