Change main thread name to PyBitmessage
This commit is contained in:
parent
196d688b13
commit
0150a35dd4
|
@ -14,7 +14,7 @@ def signal_handler(signal, frame):
|
|||
print "Got signal %i in %s/%s" % (signal, current_process().name, current_thread().name)
|
||||
if current_process().name != "MainProcess":
|
||||
raise StopIteration("Interrupted")
|
||||
if current_thread().name != "MainThread":
|
||||
if current_thread().name != "PyBitmessage":
|
||||
return
|
||||
shutdown = 1
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ class Main:
|
|||
|
||||
self.setSignalHandler()
|
||||
|
||||
helper_threading.set_thread_name("MainThread")
|
||||
helper_threading.set_thread_name("PyBitmessage")
|
||||
|
||||
helper_bootstrap.knownNodes()
|
||||
# Start the address generation thread
|
||||
|
|
|
@ -51,7 +51,7 @@ def signal_handler(signal, frame):
|
|||
raise SystemExit
|
||||
if "PoolWorker" in current_process().name:
|
||||
raise SystemExit
|
||||
if current_thread().name != "MainThread":
|
||||
if current_thread().name != "PyBitmessage":
|
||||
return
|
||||
logger.error("Got signal %i", signal)
|
||||
if BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon'):
|
||||
|
|
|
@ -12,7 +12,7 @@ try:
|
|||
threading.Thread.__bootstrap_original__ = threading.Thread._Thread__bootstrap
|
||||
threading.Thread._Thread__bootstrap = _thread_name_hack
|
||||
except ImportError:
|
||||
def set_thread_name(name): pass
|
||||
def set_thread_name(name): threading.current_thread().name = name
|
||||
|
||||
class StoppableThread(object):
|
||||
def initStop(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user