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

熱點內容
phpfile亂碼 發布:2025-07-16 03:57:54 瀏覽:93
手機存儲空間擴容 發布:2025-07-16 03:52:07 瀏覽:861
小米4清除緩存 發布:2025-07-16 03:03:17 瀏覽:563
如何緩解壓力英語作文 發布:2025-07-16 03:03:15 瀏覽:15
手機視頻怎麼緩存 發布:2025-07-16 02:59:05 瀏覽:933
安卓手機設備在哪裡找 發布:2025-07-16 02:49:28 瀏覽:357
php建立數組 發布:2025-07-16 02:34:30 瀏覽:284
oracle存儲過程同步 發布:2025-07-16 02:29:18 瀏覽:941
歐諾s買哪個配置的好 發布:2025-07-16 02:26:22 瀏覽:559
熱點可以建立ftp嗎 發布:2025-07-16 02:26:21 瀏覽:304