终结器终结器线程 [英] Dead Finalizer Thread

查看:106
本文介绍了终结器终结器线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是线程的转储,它显示Finalizer线程已死.有人知道为什么GC Finalizer线程会死掉吗?另外,有谁知道终结器死后调用堆栈是什么?

Here's a dump of the threads and it's showing the Finalizer thread as dead. Does anyone know why the GC finalizer thread would die? Also, does anyone know how to find out what the call stack was when the finalizer died?

推荐答案

谢谢您在这里发布.

>> 当GC遇到死"字样时,需要完成的对象,它将放弃回收死对象的存储的尝试.而是将对象放在队列中 我知道的对象需要完成"并将该对象视为活动对象,直到完成终结器线程为止.

When the GC encounters a "dead" object that needs finalization, it abandons its attempt to reclaim the dead object's storage. Instead, it puts the object on a queue of "objects that I know need finalization" and treats that object as alive until the finalizer thread is done with it.

GC不会等待"直到执行终结器,然后再回收存储.  稍后 GC会再次检查该对象并说您是否还死了?终结器运行了吗?"如果答案为是",则返回否".然后该对象将被回收.

The GC does "wait" until the finalizer is executed before reclaiming the storage. Later on the GC will check the object again and say "are you still dead? And has your finalizer run?" If the answer is "yes" then the object gets reclaimed.

有关更多详细信息,您想查看以下链接.

For more details, you would like to check the following links.

https://msdn. microsoft.com/en-us/library/ee787088%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

http://stackoverflow.com /questions/5215452/net-gc-access-a-synchronizedobject-from-a-finalizer/5215671#5215671

>> 在装有SOS调试器扩展程序的WinDbg或Visual Studio调试器中, ;您可以使用一些命令来显示所有线程及其调用堆栈.

有关命令,请参阅以下链接.

For the command, please refer to the following links.

https://msdn. microsoft.com/en-us/library/ee851764%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

我希望这会有所帮助.

最好的问候,

温迪


这篇关于终结器终结器线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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