當前位置:首頁 » 編程語言 » 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-01-13 14:16:54 瀏覽:172
D演算法求矩陣 發布:2025-01-13 14:16:20 瀏覽:136
商城前端源碼 發布:2025-01-13 14:08:43 瀏覽:48
每個人身上都有密碼是什麼 發布:2025-01-13 14:08:40 瀏覽:472
怎麼看java 發布:2025-01-13 13:54:18 瀏覽:10
沒腳本導演 發布:2025-01-13 13:52:22 瀏覽:339
獲取android簽名 發布:2025-01-13 13:40:21 瀏覽:595
單片機編譯器和驅動 發布:2025-01-13 13:31:33 瀏覽:440
tis伺服器怎麼進pe 發布:2025-01-13 13:31:02 瀏覽:277
android線程與線程通信 發布:2025-01-13 13:30:27 瀏覽:39