MCPcopy Create free account
hub / github.com/chen3feng/toft / GetId

Method GetId

system/threading/base_thread.cpp:94–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int BaseThread::GetId() const
95{
96 if (m_id != 0)
97 return m_id;
98
99 // GetId is rarely used, so busy wait is more fitness
100 while (AtomicGet(&m_id) == 0)
101 ThisThread::Sleep(1);
102
103 return m_id;
104}
105
106bool BaseThread::IsAlive() const
107{

Callers

nothing calls this directly

Calls 1

AtomicGetFunction · 0.85

Tested by

no test coverage detected