我對python比較陌生,迄今爲止我只瀏覽了編程的表面,這就是爲什麼我對守護進程感到困惑。我通常知道他們在做什麼,但我不確定在Python中實現它們的最佳方式是什麼。我發現this鏈接,演示如何在python中創建守護進程。然而,我想知道這是否不同的守護進程實現
#!/usr/bin/env python3.2
import threading
class Update(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
pass #something you want to run in the background
continous = Update
continous.daemon = True
continous.start()
會一樣有效?
在問題中加入你指的鏈接。 – stderr 2012-08-14 04:13:46
哎呦,對不起。我剛纔添加了它 – Lobabob 2012-08-14 20:37:32