| 175 | thread_local Thread* currentThread = nullptr; |
| 176 | |
| 177 | void 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 | |
| 192 | Thread* Thread::getCurrent() { |
| 193 | return currentThread; |
no test coverage detected