Skip to content

Commit 8c32d9d

Browse files
authored
server: explicitly set the function name in lambda (#17538)
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 <[email protected]>
1 parent 0874693 commit 8c32d9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/server/server-queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ server_task_result_ptr server_response::recv(const std::unordered_set<int> & id_
199199
std::unique_lock<std::mutex> lock(mutex_results);
200200
condition_results.wait(lock, [&]{
201201
if (!running) {
202-
RES_DBG("%s : queue result stop\n", __func__);
202+
RES_DBG("%s : queue result stop\n", "recv");
203203
std::terminate(); // we cannot return here since the caller is HTTP code
204204
}
205205
return !queue_results.empty();

0 commit comments

Comments
 (0)