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

关于 Java gc 的问题

  •  
  •   GuardX · Jan 13, 2023 · 2210 views
    This topic created in 1222 days ago, the information mentioned may be changed or developed.

    在 full gc 时会 shutdown 掉部分线程吗,在 google 上并没有查到类似的场景。

    3 replies    2023-01-13 17:46:55 +08:00
    matepi
        2
    matepi  
       Jan 13, 2023
    个人理解如果出了 oom 之类的,对应影响到的线程如果没有做一些异常全捕获 Throwable 的话,线程自然是会退出

    当然,除了 oom 整体进程能不能跑都是没准的了
    GuardX
        3
    GuardX  
    OP
       Jan 13, 2023
    @h0099 感谢大佬解答,不过 stw 的场景可以理解,会导致线程暂停,不过想讨论下比如 zk 心跳线程因为 fullgc 导致 shutdown 这种情况,可能要去 G1 源码里找找答案了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1113 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 18:37 · PVG 02:37 · LAX 11:37 · JFK 14:37
    ♥ Do have faith in what you're doing.