chat: join ChatLLM threads without calling destructors (#2043)

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
Jared Van Bortel
2024-03-06 16:42:59 -05:00
committed by GitHub
parent d8c842263f
commit a0bd96f75d
5 changed files with 9 additions and 8 deletions

View File

@@ -95,6 +95,10 @@ ChatLLM::ChatLLM(Chat *parent, bool isServer)
ChatLLM::~ChatLLM()
{
destroy();
}
void ChatLLM::destroy() {
m_stopGenerating = true;
m_llmThread.quit();
m_llmThread.wait();