This commit is contained in:
Behnam M 2024-01-10 12:07:56 -05:00 committed by GitHub
parent a4b26cc635
commit 29a5a94d5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2901,18 +2901,6 @@ int main(int argc, char **argv)
return 0;
});
// GG: if I put the main loop inside a thread, it crashes on the first request when build in Debug!?
// "Bus error: 10" - this is on macOS, it does not crash on Linux
//std::thread t2([&]()
{
bool running = true;
while (running)
{
running = llama.update_slots();
}
}
//);
// load the model
if (!llama.load_model(params))
@ -3277,6 +3265,18 @@ int main(int argc, char **argv)
return res.set_content(result.result_json.dump(), "application/json; charset=utf-8");
});
// GG: if I put the main loop inside a thread, it crashes on the first request when build in Debug!?
// "Bus error: 10" - this is on macOS, it does not crash on Linux
//std::thread t2([&]()
{
bool running = true;
while (running)
{
running = llama.update_slots();
}
}
//);
t.join();
llama_backend_free();