@@ -161,7 +161,7 @@ int main(int argc, char ** argv) {
161161 auto clean_up = [&ctx_http, &ctx_server]() {
162162 SRV_INF (" %s: cleaning up before exit...\n " , __func__);
163163 ctx_http.stop ();
164- ctx_server.queue_results . terminate ();
164+ ctx_server.terminate ();
165165 llama_backend_free ();
166166 };
167167
@@ -189,17 +189,9 @@ int main(int argc, char ** argv) {
189189
190190 LOG_INF (" %s: model loaded\n " , __func__);
191191
192- ctx_server.queue_tasks .on_new_task ([&ctx_server](server_task && task) {
193- ctx_server.process_single_task (std::move (task));
194- });
195-
196- ctx_server.queue_tasks .on_update_slots ([&ctx_server]() {
197- ctx_server.update_slots ();
198- });
199-
200192 shutdown_handler = [&](int ) {
201193 // this will unblock start_loop()
202- ctx_server.queue_tasks . terminate ();
194+ ctx_server.terminate ();
203195 };
204196
205197 // TODO: refactor in common/console
@@ -219,8 +211,8 @@ int main(int argc, char ** argv) {
219211
220212 LOG_INF (" %s: server is listening on %s\n " , __func__, ctx_http.listening_address .c_str ());
221213 LOG_INF (" %s: starting the main loop...\n " , __func__);
222- // this call blocks the main thread until queue_tasks .terminate() is called
223- ctx_server.queue_tasks . start_loop ();
214+ // this call blocks the main thread until ctx_server .terminate() is called
215+ ctx_server.start_loop ();
224216
225217 clean_up ();
226218 if (ctx_http.thread .joinable ()) {
0 commit comments