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

熱點內容
redhat存儲 發布:2025-07-02 11:12:50 瀏覽:585
優酷不能用流量緩存 發布:2025-07-02 11:10:46 瀏覽:940
彩虹島小草怎麼設置腳本 發布:2025-07-02 11:10:33 瀏覽:921
越壓縮越封閉 發布:2025-07-02 11:09:10 瀏覽:90
jre下載linux 發布:2025-07-02 11:07:43 瀏覽:219
安卓手機換行如何操作 發布:2025-07-02 11:03:12 瀏覽:547
玩客雲伺服器搭建 發布:2025-07-02 10:59:58 瀏覽:357
假笑資料庫 發布:2025-07-02 10:59:09 瀏覽:850
手機怎麼製作腳本 發布:2025-07-02 10:59:05 瀏覽:366
mybatis的動態sql語句 發布:2025-07-02 10:56:51 瀏覽:958