当前位置:首页 » 编程语言 » pythondaemonthread

pythondaemonthread

发布时间: 2024-09-18 06:31:27

python daemon thread 什么概念

daemon
A boolean value indicating whether this thread is a daemon thread (True) or not (False). This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False.
The entire Python program exits when no alive non-daemon threads are left.
当daemon被设置为True时,如果主线程退出,那么子线程也将跟着退出,
反之,子线程将继续运行,直到正常退出。

热点内容
java返回this 发布:2025-10-20 08:28:16 浏览:566
制作脚本网站 发布:2025-10-20 08:17:34 浏览:855
python中的init方法 发布:2025-10-20 08:17:33 浏览:555
图案密码什么意思 发布:2025-10-20 08:16:56 浏览:734
怎么清理微信视频缓存 发布:2025-10-20 08:12:37 浏览:656
c语言编译器怎么看执行过程 发布:2025-10-20 08:00:32 浏览:975
邮箱如何填写发信服务器 发布:2025-10-20 07:45:27 浏览:227
shell脚本入门案例 发布:2025-10-20 07:44:45 浏览:87
怎么上传照片浏览上传 发布:2025-10-20 07:44:03 浏览:777
python股票数据获取 发布:2025-10-20 07:39:44 浏览:683