當前位置:首頁 » 編程語言 » 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