memgraph/src/utils/thread.cpp
Matej Ferencevic 6d10d90d98 Remove unused utils
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2636
2020-01-23 17:22:51 +01:00

16 lines
351 B
C++

#include "utils/thread.hpp"
#include <sys/prctl.h>
#include <glog/logging.h>
namespace utils {
void ThreadSetName(const std::string &name) {
CHECK(name.size() <= 16) << "Thread name '" << name << "'too long";
LOG_IF(WARNING, prctl(PR_SET_NAME, name.c_str()) != 0)
<< "Couldn't set thread name: " << name << "!";
}
} // namespace utils