MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / send

Method send

smallthinker/tools/server/server.cpp:1826–1839  ·  view source on GitHub ↗

Send a new result to a waiting id_task

Source from the content-addressed store, hash-verified

1824
1825 // Send a new result to a waiting id_task
1826 void send(server_task_result_ptr && result) {
1827 SRV_DBG("sending result for task id = %d\n", result->id);
1828
1829 std::unique_lock<std::mutex> lock(mutex_results);
1830 for (const auto & id_task : waiting_task_ids) {
1831 if (result->id == id_task) {
1832 SRV_DBG("task id = %d pushed to result queue\n", result->id);
1833
1834 queue_results.emplace_back(std::move(result));
1835 condition_results.notify_all();
1836 return;
1837 }
1838 }
1839 }
1840
1841 // terminate the waiting loop
1842 void terminate() {

Callers 7

send_errorMethod · 0.45
send_partial_responseMethod · 0.45
send_final_responseMethod · 0.45
send_embeddingMethod · 0.45
send_rerankMethod · 0.45
process_single_taskMethod · 0.45
zrFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected