Fix destruction and tear down of the embedding thread. (#2328)

* Fix destruction and tear down of the embedding thread.

Signed-off-by: Adam Treat <treat.adam@gmail.com>

* Fix order of deletion to prevent use after free.

Signed-off-by: Adam Treat <treat.adam@gmail.com>

---------

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
AT
2024-05-15 09:01:53 -05:00
committed by GitHub
parent 1427ef7195
commit 61cefcfd8a
3 changed files with 10 additions and 0 deletions

View File

@@ -552,6 +552,7 @@ Database::~Database()
{
m_dbThread.quit();
m_dbThread.wait();
delete m_embLLM;
}
void Database::scheduleNext(int folder_id, size_t countForFolder)