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

熱點內容
linux分割行 發布:2024-11-24 22:11:02 瀏覽:577
獲取ftp文件 發布:2024-11-24 21:54:20 瀏覽:520
資源平滑演算法 發布:2024-11-24 21:54:18 瀏覽:58
vs和vc編譯器哪個好使 發布:2024-11-24 21:54:07 瀏覽:805
愛課程適用於什麼安卓系統 發布:2024-11-24 21:54:02 瀏覽:39
51單片機編譯 發布:2024-11-24 21:50:05 瀏覽:367
android常用的工具類 發布:2024-11-24 21:42:25 瀏覽:48
用戶管理源碼 發布:2024-11-24 21:29:36 瀏覽:678
監控怎麼配置路由器 發布:2024-11-24 21:29:27 瀏覽:456
小型編譯器的實現 發布:2024-11-24 21:27:48 瀏覽:1000