]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server: explicitly set the function name in lambda (#17538)
authorHaiyue Wang <redacted>
Sat, 29 Nov 2025 17:43:29 +0000 (01:43 +0800)
committerGitHub <redacted>
Sat, 29 Nov 2025 17:43:29 +0000 (18:43 +0100)
As [1] explained, the real debug message will be like:
"res    operator(): operator() : queue result stop"

Set the name explicitly, the message is easy for debugging:
"res    operator(): recv : queue result stop"

The left "operator()" is generated by 'RES_DBG() ... __func__'

[1]: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/lambda-function-name.html

Signed-off-by: Haiyue Wang <redacted>
tools/server/server-queue.cpp

index 5a74fd76ac3c18715df54999cda2ff056e4e8f29..65c8a0a9ae4a146c2fa43d18def8e5eda2a7a4d9 100644 (file)
@@ -199,7 +199,7 @@ server_task_result_ptr server_response::recv(const std::unordered_set<int> & id_
         std::unique_lock<std::mutex> lock(mutex_results);
         condition_results.wait(lock, [&]{
             if (!running) {
-                RES_DBG("%s : queue result stop\n", __func__);
+                RES_DBG("%s : queue result stop\n", "recv");
                 std::terminate(); // we cannot return here since the caller is HTTP code
             }
             return !queue_results.empty();