"prettier" thread exit message
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import threading
|
import threading
|
||||||
import time, random, string, re, copy
|
import time, random, string, re, copy
|
||||||
import requests
|
import requests
|
||||||
|
import sys
|
||||||
#from geoip import geolite2
|
#from geoip import geolite2
|
||||||
|
|
||||||
import config
|
import config
|
||||||
@@ -128,12 +129,13 @@ class WorkerThread():
|
|||||||
if self.done.is_set(): break
|
if self.done.is_set(): break
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
if self.thread:
|
if self.thread:
|
||||||
_log("thread terminated", self.id)
|
sys.stdout.write('%s/%s\tthread terminated\r' % (time.strftime('%H:%M:%S', time.gmtime()), self.id))
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
class Proxywatchd():
|
class Proxywatchd():
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
_log('Requesting proxywatchd to halt (%d thread(s))' % len([item for item in self.threads if True]))
|
_log('\rRequesting proxywatchd to halt (%d thread(s))' % len([item for item in self.threads if True]))
|
||||||
self.stopping.set()
|
self.stopping.set()
|
||||||
|
|
||||||
def _cleanup(self):
|
def _cleanup(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user