| 2 | #include "MutexWrapper.h" |
| 3 | |
| 4 | bool MutexWrapper::TryLock() |
| 5 | { |
| 6 | if (m_handle == INVALID_HANDLE_VALUE) |
| 7 | return false; |
| 8 | |
| 9 | auto const waitResult = WaitForSingleObject(m_handle, 0); |
| 10 | return waitResult == WAIT_OBJECT_0; |
| 11 | } |
| 12 | |
| 13 | MutexWrapper::~MutexWrapper() |
| 14 | { |