How to know who kills my threads

后端 未结 15 704
南旧
南旧 2020-12-05 00:19

I got a thread that is just banishing.. i\'d like to know who is killing my thread and why.

It occurs to me my thread is being killed by the OS, but i\'d like to

15条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 01:01

    You should instrument DoSomethingForALongLongTime() with lots of debug logs, so you can find out at what spot does the code stop executing. Or attach a debugger and break on all first chance exceptions.

提交回复
热议问题