MCPcopy Create free account
hub / github.com/apache/kvrocks / ThreadSetName

Function ThreadSetName

src/common/thread_util.cc:33–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace util {
32
33void ThreadSetName(const char *name) {
34#ifdef __APPLE__
35 pthread_setname_np(name);
36#else
37 pthread_setname_np(pthread_self(), name);
38#endif
39}
40
41#ifdef __APPLE__
42double ThreadGetCPUTime(std::thread::native_handle_type thread_id) {

Callers 1

CreateThreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected