MCPcopy Create free account
hub / github.com/Snapchat/Valdi / handler

Method handler

valdi_core/src/valdi_core/cpp/Threading/Thread.cpp:177–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175thread_local Thread* currentThread = nullptr;
176
177void Thread::handler() {
178 currentThread = this;
179
180#if !defined(ANDROID)
181#if __APPLE__
182 pthread_set_qos_class_self_np(ValdiQoSClassToGCD(_qosClass), 0);
183 pthread_setname_np(_name.getCStr());
184#else
185 setpriority(PRIO_PROCESS, 0, qoSClassToNiceLevel(_qosClass));
186#endif
187#endif
188
189 _runnable();
190}
191
192Thread* Thread::getCurrent() {
193 return currentThread;

Callers 7

threadEntryPointFunction · 0.45
processResponseMethod · 0.45
tickMethod · 0.45
mockFlushableWithDataFunction · 0.45
flushMethod · 0.45

Calls 3

ValdiQoSClassToGCDFunction · 0.85
qoSClassToNiceLevelFunction · 0.85
getCStrMethod · 0.45

Tested by

no test coverage detected