当前位置:首页 » 编程语言 » 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时,如果主线程退出,那么子线程也将跟着退出,
反之,子线程将继续运行,直到正常退出。

热点内容
日本溥仪访问 发布:2025-07-03 04:24:27 浏览:672
java文件遍历 发布:2025-07-03 04:22:22 浏览:139
android画虚线 发布:2025-07-03 04:11:04 浏览:384
系统启动密码怎么取消 发布:2025-07-03 04:08:06 浏览:746
python程序设计第三版课后答案 发布:2025-07-03 03:58:08 浏览:213
socket上传文件 发布:2025-07-03 03:57:24 浏览:895
安卓cleo脚本 发布:2025-07-03 03:41:26 浏览:245
编程器解读 发布:2025-07-03 03:22:49 浏览:24
中国电信加密通信业务 发布:2025-07-03 03:06:00 浏览:521
脚本家的台词 发布:2025-07-03 03:05:50 浏览:709