MCPcopy Create free account
hub / github.com/ceph/ceph / make_named_thread

Function make_named_thread

src/common/Thread.h:74–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73template<typename Fun, typename... Args>
74std::thread make_named_thread(std::string_view n,
75 Fun&& fun,
76 Args&& ...args) {
77
78 return std::thread([n = std::string(n)](auto&& fun, auto&& ...args) {
79 ceph_pthread_setname(n.data());
80 std::invoke(std::forward<Fun>(fun),
81 std::forward<Args>(args)...);
82 }, std::forward<Fun>(fun), std::forward<Args>(args)...);
83}
84#endif

Callers 9

do_mapFunction · 0.85
do_unmapFunction · 0.85
NBDWatchCtxMethod · 0.85
initMethod · 0.85
mainFunction · 0.85
runMethod · 0.85
TestRunnerMethod · 0.85
initMethod · 0.85
startMethod · 0.85

Calls 4

ceph_pthread_setnameFunction · 0.85
threadFunction · 0.50
invokeFunction · 0.50
dataMethod · 0.45

Tested by 1

TestRunnerMethod · 0.68