| 92 | } |
| 93 | |
| 94 | int 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 | |
| 106 | bool BaseThread::IsAlive() const |
| 107 | { |
nothing calls this directly
no test coverage detected