MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / post

Method post

tools/server/server-queue.cpp:22–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20//
21
22int server_queue::post(server_task && task, bool front) {
23 std::unique_lock<std::mutex> lock(mutex_tasks);
24 GGML_ASSERT(task.id != -1);
25 // if this is cancel task make sure to clean up pending tasks
26 if (task.type == SERVER_TASK_TYPE_CANCEL) {
27 cleanup_pending_task(task.id_target);
28 }
29 const int task_id = task.id;
30 QUE_DBG("new task, id = %d, front = %d\n", task_id, front);
31 if (front) {
32 queue_tasks.push_front(std::move(task));
33 } else {
34 queue_tasks.push_back(std::move(task));
35 }
36 time_last_task = ggml_time_ms();
37 condition_tasks.notify_one();
38 return task_id;
39}
40
41int server_queue::post(std::vector<server_task> && tasks, bool front) {
42 std::unique_lock<std::mutex> lock(mutex_tasks);

Callers 3

post_taskMethod · 0.45
post_tasksMethod · 0.45
stopMethod · 0.45

Calls 4

ggml_time_msFunction · 0.85
push_frontMethod · 0.80
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected