當前位置:首頁 » 編程語言 » 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時,如果主線程退出,那麼子線程也將跟著退出,
反之,子線程將繼續運行,直到正常退出。

熱點內容
手機版我的世界如何做伺服器 發布:2024-09-19 16:59:05 瀏覽:491
編譯器錯誤都怎麼解決 發布:2024-09-19 16:51:53 瀏覽:472
洛達三代安卓怎麼用 發布:2024-09-19 16:41:02 瀏覽:88
androideclipse目錄 發布:2024-09-19 16:10:37 瀏覽:933
linux系統是什麼系統 發布:2024-09-19 16:10:35 瀏覽:122
資料庫財經 發布:2024-09-19 16:03:23 瀏覽:935
直接腳本 發布:2024-09-19 15:49:09 瀏覽:242
安卓代碼怎麼用 發布:2024-09-19 15:35:38 瀏覽:385
微信為什麼要用伺服器 發布:2024-09-19 15:35:29 瀏覽:883
東芝硬碟加密 發布:2024-09-19 15:29:44 瀏覽:139