父线程死后,子线程会死吗? [英] Do children threads die after parent's thread death?

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

问题描述

我正在开发一个多线程程序,对此我不确定.

I'm working on a multi-threaded program and I'm not sure about this.

推荐答案

否,但线程标记为 IsBackground 将在其托管进程终止时终止,而如果 IsBackground 为 false,它们将阻止进程终止,直到它们完成.

No, but threads marked as IsBackground will die when their hosting process is terminated, whereas if IsBackground is false, they will prevent the process from terminating until they are finished.

这篇关于父线程死后,子线程会死吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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