當前位置:首頁 » 編程語言 » 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-06-15 22:46:08 瀏覽:595
編譯程序兼容問題 發布:2025-06-15 22:40:22 瀏覽:867
java求百分比 發布:2025-06-15 22:35:48 瀏覽:519
sql的distinct去重 發布:2025-06-15 22:33:22 瀏覽:700
硬碟伺服器做什麼用 發布:2025-06-15 22:33:21 瀏覽:487
系統緩存是什麼 發布:2025-06-15 22:10:56 瀏覽:6
08款馬自達3配置如何 發布:2025-06-15 21:59:34 瀏覽:483
修改outlook存儲 發布:2025-06-15 21:56:37 瀏覽:427
網上商城java 發布:2025-06-15 21:00:52 瀏覽:181
pythonshell換行 發布:2025-06-15 21:00:06 瀏覽:286