如何重新启动死线程? [英] How can a dead thread be restarted?

查看:130
本文介绍了如何重新启动死线程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

死线程带回可运行状态的所有不同可能性是什么。

What are all the different possibilities to bring the dead thread back to runnable state.

推荐答案

如果你看一下线程生命周期图像,一旦线程终止,你就无法回到新的位置。

If you look at the Thread Life Cycle Image, there is no way you can go back to new position once your thread has terminated.

所以有无法将死线程恢复到可运行状态,而是应该创建一个新的Thread实例。

So there is no way to bring back the dead thread to runnable state,instead you should create a new Thread instance.

这篇关于如何重新启动死线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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