mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
[voice_assistant] Note the background task exception in the threading comment
model_load_task is declared below the comment and runs off the main loop, so the blanket main-loop-only claim was wrong for it.
This commit is contained in:
@@ -381,8 +381,9 @@ class VoiceAssistant final : public Component {
|
||||
// Used from the background download task, not just the main loop, so that a download never blocks the loop.
|
||||
http_request::HttpRequestComponent *http_request_{nullptr};
|
||||
|
||||
/* Runtime model management. Every member and method below is touched only on the main loop; the
|
||||
background download task communicates results back via defer() with everything captured by value. */
|
||||
/* Runtime model management. Everything below is touched only on the main loop, except model_load_task (the
|
||||
background task body), which reads http_request_ off the loop and hands results back via defer() with
|
||||
everything captured by value. */
|
||||
|
||||
// External wake words advertised by Home Assistant, rebuilt from each configuration request so stale
|
||||
// entries drop out. Ownership of a loaded model itself lives in the WakeWordModel (micro_wake_word owns it).
|
||||
|
||||
Reference in New Issue
Block a user