當前位置:首頁 » 編程語言 » 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-09-19 08:35:46 瀏覽:69
博科存儲交換機配置 發布:2025-09-19 08:34:31 瀏覽:133
xp共享win7沒有訪問許可權 發布:2025-09-19 08:29:15 瀏覽:284
cmd運行python程序 發布:2025-09-19 08:16:07 瀏覽:294
如何給你的安卓手機正確充電 發布:2025-09-19 08:15:18 瀏覽:847
vs2010怎麼寫c語言 發布:2025-09-19 07:31:05 瀏覽:877
除了證券外還有哪些投資配置 發布:2025-09-19 07:01:48 瀏覽:86
android把函數 發布:2025-09-19 07:01:04 瀏覽:292
垃圾站源碼 發布:2025-09-19 06:42:30 瀏覽:165
java按鈕事件 發布:2025-09-19 06:29:45 瀏覽:465