Add thread names
parent
b67964274b
commit
13d7f742a7
|
@ -74,7 +74,8 @@ def setup(hass, config):
|
|||
hass.bus.listen_once(
|
||||
ha.EVENT_HOMEASSISTANT_START,
|
||||
lambda event:
|
||||
threading.Thread(target=server.start, daemon=True).start())
|
||||
threading.Thread(target=server.start, daemon=True,
|
||||
name='HTTP-server').start())
|
||||
|
||||
hass.http = server
|
||||
hass.config.api = rem.API(util.get_local_ip(), api_password, server_port,
|
||||
|
|
|
@ -775,7 +775,7 @@ def create_timer(hass, interval=TIMER_INTERVAL):
|
|||
|
||||
def start_timer(event):
|
||||
"""Start the timer."""
|
||||
thread = threading.Thread(target=timer)
|
||||
thread = threading.Thread(target=timer, name='Timer')
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
|
|
|
@ -331,7 +331,9 @@ class ThreadPool(object):
|
|||
if not self.running:
|
||||
raise RuntimeError("ThreadPool not running")
|
||||
|
||||
worker = threading.Thread(target=self._worker)
|
||||
worker = threading.Thread(
|
||||
target=self._worker,
|
||||
name='ThreadPool Worker {}'.format(self.worker_count))
|
||||
worker.daemon = True
|
||||
worker.start()
|
||||
|
||||
|
|
Loading…
Reference in New Issue