當前位置:首頁 » 編程語言 » 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-05 16:10:30 瀏覽:528
微博資料庫設計 發布:2025-07-05 15:30:55 瀏覽:25
linux485 發布:2025-07-05 14:38:28 瀏覽:305
php用的軟體 發布:2025-07-05 14:06:22 瀏覽:756
沒有許可權訪問計算機 發布:2025-07-05 13:29:11 瀏覽:433
javaweb開發教程視頻教程 發布:2025-07-05 13:24:41 瀏覽:708
康師傅控流腳本破解 發布:2025-07-05 13:17:27 瀏覽:243
java的開發流程 發布:2025-07-05 12:45:11 瀏覽:688
怎麼看內存卡配置 發布:2025-07-05 12:29:19 瀏覽:285
訪問學者英文個人簡歷 發布:2025-07-05 12:29:17 瀏覽:835