默认线程,如DestroyJavaVM,Reference Handler,Signal Dispatcher [英] Default threads like, DestroyJavaVM, Reference Handler, Signal Dispatcher

查看:623
本文介绍了默认线程,如DestroyJavaVM,Reference Handler,Signal Dispatcher的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我自己的探查器上工作,我想解释一下我所看到的。即使在最简单的程序中也会出现一些默认线程:

Working on a profiler of my own, I would like to explain what I see. There are some default threads which always appear, even in the simplest program:


  • DestroyJavaVM

  • 信号Dispatcher

  • Finalizer

  • 参考处理程序

  • DestroyJavaVM
  • Signal Dispatcher
  • Finalizer
  • Reference Handler

虽然他们的名字非常自我记录,我想获得更多信息。看来这些线程没有记录,是否有人知道挖掘这些信息的来源,甚至确切知道这些线程的作用?

Although their names are quite self-documenting, I would like to get a little bit more information. It seems these threads are not documented, does someone know a source to dig for these information or even knows exactly what these threads do?

推荐答案


  1. DestroyJavaVM是一个在程序
    退出时卸载Java VM的线程。大多数情况下它应该等待,直到你的虚拟机启示。

  2. Signal Dispatcher是一个线程,用于处理操作系统发送给你的jvm的本机信号。

  3. 终结器线程从终结队列中拉出对象并调用它的finalize方法。

  4. 引用处理程序是一个高优先级的线程,用于将挂起的参考资料。它在java.lang.ref.References.java中定义

  1. DestroyJavaVM is a thread that unloads the Java VM on program exit. Most of the time it should be waiting, until apocalypse of your VM.
  2. Signal Dispatcher is a thread that handles the native signals sent by the OS to your jvm.
  3. Finalizer threads pull objects from the finalization queue and calls it finalize method.
  4. Reference Handler is a high-priority thread to enqueue pending References. Its defined in java.lang.ref.References.java

这篇关于默认线程,如DestroyJavaVM,Reference Handler,Signal Dispatcher的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆