Use call_soon_threadsafe in render_will_timeout of template helper (#106514)

pull/106719/head
Jan-Philipp Benecke 2023-12-30 13:55:53 +01:00 committed by GitHub
parent ee1b0b46ce
commit 9d36b716e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ class Template:
except Exception: # pylint: disable=broad-except
self._exc_info = sys.exc_info()
finally:
run_callback_threadsafe(self.hass.loop, finish_event.set)
self.hass.loop.call_soon_threadsafe(finish_event.set)
try:
template_render_thread = ThreadWithException(target=_render_template)