Skip to content

Commit

Permalink
add todo.
Browse files Browse the repository at this point in the history
  • Loading branch information
ywqzzy committed Nov 2, 2021
1 parent f9dc432 commit 79751fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dbms/src/Common/setThreadName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extern const int PTHREAD_ERROR;
void setThreadName(const char * tname)
{
constexpr auto max_len = 15; // thread name will be tname[:MAX_LEN]
// TODO: Replace strlen for safety
if (std::strlen(tname) > max_len)
std::cerr << "set thread name " << tname << " is too long and will be truncated by system\n";

Expand Down

0 comments on commit 79751fc

Please sign in to comment.