我有一个只是放逐的线程..我想知道是谁杀了我的线程,为什么.
它发生在我身上我的线程被操作系统杀死,但我想确认一下,如果可能的话就知道它为什么要杀了它.
至于线程,我可以断言它在死亡前至少有40分钟的执行时间,但它突然在5分钟内死亡.
public void RunWorker()
{
Thread worker = new Thread(delegate()
{
try
{
DoSomethingForALongLongTime();
}
catch(Exception e)
{
//Nothing is never logged :(
LogException(e);
throw e;
}
});
worker.IsBackground = true;
worker.SetApartmentState(System.Threading.ApartmentState.STA);
worker.Start();
}
Run Code Online (Sandbox Code Playgroud)
编辑:寻址答案
想到这些事情就把我带到了这个问题,谁杀了我的线程?
PS.用蜡烛棒在客厅里不是Lady Goldent :)