Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chenshuo/muduo
/ ThreadNameInitializer
Method
ThreadNameInitializer
muduo/base/Thread.cc:42–47 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
40
{
41
public:
42
ThreadNameInitializer()
43
{
44
muduo::CurrentThread::t_threadName =
"main"
;
45
CurrentThread::tid();
46
pthread_atfork(NULL, NULL, &afterFork);
47
}
48
};
49
50
ThreadNameInitializer init;
Callers
nothing calls this directly
Calls
1
tid
Function · 0.85
Tested by
no test coverage detected