@@ -392,7 +392,7 @@ struct server_queue {
392
392
// callback functions
393
393
std::function<void (server_task &)> callback_new_task;
394
394
std::function<void (server_task_multi &)> callback_finish_multitask;
395
- std::function<void (void )> callback_run_slots ;
395
+ std::function<void (void )> callback_update_slots ;
396
396
397
397
// Add a new task to the end of the queue
398
398
int post (server_task task) {
@@ -431,8 +431,8 @@ struct server_queue {
431
431
}
432
432
433
433
// Register the function to be called when all slots data is ready to be processed
434
- void on_run_slots (std::function<void (void )> callback) {
435
- callback_run_slots = std::move (callback);
434
+ void on_update_slots (std::function<void (void )> callback) {
435
+ callback_update_slots = std::move (callback);
436
436
}
437
437
438
438
// Call when the state of one slot is changed
@@ -457,7 +457,7 @@ struct server_queue {
457
457
* - Wait until a new task arrives
458
458
* - Process the task (i.e. maybe copy data into slot)
459
459
* - Check if multitask is finished
460
- * - Run all slots
460
+ * - Update all slots
461
461
*/
462
462
void start_loop () {
463
463
running = true ;
@@ -495,9 +495,9 @@ struct server_queue {
495
495
}
496
496
497
497
// all tasks in the current loop is processed, slots data is now ready
498
- LOG_VERBOSE (" callback_run_slots " , {});
498
+ LOG_VERBOSE (" callback_update_slots " , {});
499
499
500
- callback_run_slots ();
500
+ callback_update_slots ();
501
501
502
502
LOG_VERBOSE (" wait for new task" , {});
503
503
{
@@ -1599,7 +1599,7 @@ struct server_context {
1599
1599
queue_results.send (result);
1600
1600
}
1601
1601
1602
- void run_slots () {
1602
+ void update_slots () {
1603
1603
if (system_need_update) {
1604
1604
system_prompt_update ();
1605
1605
}
@@ -3473,8 +3473,8 @@ int main(int argc, char ** argv) {
3473
3473
&server_context::process_single_task, &ctx_server, std::placeholders::_1));
3474
3474
ctx_server.queue_tasks .on_finish_multitask (std::bind (
3475
3475
&server_context::on_finish_multitask, &ctx_server, std::placeholders::_1));
3476
- ctx_server.queue_tasks .on_run_slots (std::bind (
3477
- &server_context::run_slots , &ctx_server));
3476
+ ctx_server.queue_tasks .on_update_slots (std::bind (
3477
+ &server_context::update_slots , &ctx_server));
3478
3478
ctx_server.queue_results .on_multitask_update (std::bind (
3479
3479
&server_queue::update_multitask,
3480
3480
&ctx_server.queue_tasks ,
0 commit comments