當前位置:首頁 » 編程語言 » 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-10-16 08:46:10 瀏覽:930
速達sql 發布:2024-10-16 08:46:02 瀏覽:353
c語言78 發布:2024-10-16 08:34:49 瀏覽:272
linux操作gpio 發布:2024-10-16 08:28:07 瀏覽:852
python遞歸階乘 發布:2024-10-16 08:28:05 瀏覽:140
ftp匿名登錄名為 發布:2024-10-16 08:08:07 瀏覽:278
安卓手機為什麼關不了屏幕 發布:2024-10-16 08:06:24 瀏覽:650
法師需要什麼配置 發布:2024-10-16 07:57:34 瀏覽:546
查詢資料庫用戶的許可權 發布:2024-10-16 07:51:18 瀏覽:438
安卓flv播放器哪個好 發布:2024-10-16 07:45:46 瀏覽:595