| 9 | |
| 10 | template <typename T> |
| 11 | T* XLockFreeStack<T>::Pop() { |
| 12 | EnterCriticalSection(&this->m_mutex); |
| 13 | if (m_vector.empty()) { |
| 14 | LeaveCriticalSection(&this->m_mutex); |
| 15 | return nullptr; |
| 16 | } |
| 17 | |
| 18 | T* a = m_vector.back(); |
| 19 | m_vector.pop_back(); |
| 20 | |
| 21 | LeaveCriticalSection(&this->m_mutex); |
| 22 | |
| 23 | return a; |
| 24 | } |
no test coverage detected