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

求教如何监视竞争线程?

  •  
  •   PoetAndPoem · Jun 11, 2019 via Android · 1957 views
    This topic created in 2532 days ago, the information mentioned may be changed or developed.

    能确定问题在于有两个竞争线程。事件调用中有 A,B 两个方法,只要在 A 方法下加 thread.sleep,B 方法就可以正确执行。但是 A,B 都是业务方法,调用过于庞大,有什么工具可以监视出发生竞争时的线程标识吗?

    PS:bug 在于 B 方法可以执行,log 上没有打印 stack,但实际调用结果是错的。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1064 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:59 · PVG 01:59 · LAX 10:59 · JFK 13:59
    ♥ Do have faith in what you're doing.