MCPcopy Create free account
hub / github.com/catboost/catboost / ThreadProcParent

Function ThreadProcParent

util/system/thread_ut.cpp:90–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 void* ThreadProcParent(void*) {
91 const TString setName = "Parent";
92 TThread::SetCurrentThreadName(setName.data());
93
94 TThread thread(&ThreadProcChild, nullptr);
95
96 thread.Start();
97 thread.Join();
98
99 const auto getName = TThread::CurrentThreadName();
100 if (TThread::CanGetCurrentThreadName()) {
101 UNIT_ASSERT_VALUES_EQUAL(setName, getName);
102 } else {
103 UNIT_ASSERT_VALUES_EQUAL("", getName);
104 }
105 return nullptr;
106 }
107
108 Y_UNIT_TEST(TestSetThreadName) {
109 TThread thread(&ThreadProc, nullptr);

Callers

nothing calls this directly

Calls 3

dataMethod · 0.45
StartMethod · 0.45
JoinMethod · 0.45

Tested by

no test coverage detected