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

Method Start

util/system/thread.cpp:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 inline void Start() {
150 // do not do this, kids, at home
151 P_->Ref();
152 #if _WIN32_WINNT < 0x0502
153 Handle = reinterpret_cast<HANDLE>(::_beginthreadex(nullptr, (unsigned)StackSize(*P_), Proxy, (void*)P_.Get(), 0, &ThreadId));
154 #else
155 Handle = reinterpret_cast<HANDLE>(::_beginthreadex(nullptr, (unsigned)StackSize(*P_), Proxy, (void*)P_.Get(), 0, nullptr));
156 #endif
157
158 if (!Handle) {
159 P_->UnRef();
160 ythrow yexception() << "failed to create a thread";
161 }
162 }
163
164 private:
165 TParamsRef P_;

Callers

nothing calls this directly

Calls 4

StackSizeFunction · 0.85
RefMethod · 0.45
GetMethod · 0.45
UnRefMethod · 0.45

Tested by

no test coverage detected