mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Add thread names
This commit is contained in:
parent
b67964274b
commit
13d7f742a7
@ -74,7 +74,8 @@ def setup(hass, config):
|
|||||||
hass.bus.listen_once(
|
hass.bus.listen_once(
|
||||||
ha.EVENT_HOMEASSISTANT_START,
|
ha.EVENT_HOMEASSISTANT_START,
|
||||||
lambda event:
|
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.http = server
|
||||||
hass.config.api = rem.API(util.get_local_ip(), api_password, server_port,
|
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):
|
def start_timer(event):
|
||||||
"""Start the timer."""
|
"""Start the timer."""
|
||||||
thread = threading.Thread(target=timer)
|
thread = threading.Thread(target=timer, name='Timer')
|
||||||
thread.daemon = True
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
|
@ -331,7 +331,9 @@ class ThreadPool(object):
|
|||||||
if not self.running:
|
if not self.running:
|
||||||
raise RuntimeError("ThreadPool not 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.daemon = True
|
||||||
worker.start()
|
worker.start()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user