Ver Fonte

[update] 设置daemon = True

jhao104 há 8 anos atrás
pai
commit
640eba9eac
3 ficheiros alterados com 3 adições e 0 exclusões
  1. 1 0
      Run/main.py
  2. 1 0
      Schedule/ProxyRefreshSchedule.py
  3. 1 0
      Schedule/ProxyValidSchedule.py

+ 1 - 0
Run/main.py

@@ -33,6 +33,7 @@ def run():
     p_list.append(p3)
 
     for p in p_list:
+        p.daemon = True
         p.start()
     for p in p_list:
         p.join()

+ 1 - 0
Schedule/ProxyRefreshSchedule.py

@@ -86,6 +86,7 @@ def main(process_num=30):
         pl.append(proc)
 
     for num in range(process_num):
+        pl[num].daemon = True
         pl[num].start()
 
     for num in range(process_num):

+ 1 - 0
Schedule/ProxyValidSchedule.py

@@ -34,6 +34,7 @@ class ProxyValidSchedule(object):
             thread_list.append(ProxyCheck())
 
         for thread in thread_list:
+            thread.daemon = True
             thread.start()
 
         for thread in thread_list: