开发者

What should I do with stopped, dead, threads? Alive == False

开发者 https://www.devze.com 2023-02-05 04:08 出处:网络
I spawned some threads using ThreadStart and a few of them died for various reasons (the work is complete, or there was an error)

I spawned some threads using ThreadStart and a few of them died for various reasons (the work is complete, or there was an error)

Since I still have a reference to this thread, what should I do do complete the termination of this o开发者_高级运维bject? What can I do to restart it?


You don't need to do anything to complete the termination.

You can't restart a thread which has finished - but you could create a new thread to do the same task, assuming you know what that task was.

0

精彩评论

暂无评论...
验证码 换一张
取 消