MCPcopy Create free account
hub / github.com/Freeeaky/fiber-job-system / GetCurrentThread

Method GetCurrentThread

src/ManagerThreads.cpp:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21fjs::Thread* fjs::Manager::GetCurrentThread() const
22{
23#ifdef _WIN32
24 uint32_t idx = GetCurrentThreadId();
25 for (uint8_t i = 0; i < m_numThreads; i++)
26 {
27 if (m_threads[i].GetID() == idx)
28 return &m_threads[i];
29 }
30#endif
31
32 return nullptr;
33}
34
35fjs::TLS* fjs::Manager::GetCurrentTLS() const
36{

Callers

nothing calls this directly

Calls 1

GetIDMethod · 0.80

Tested by

no test coverage detected