MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / TryLock

Method TryLock

FastCopy/MutexWrapper.cpp:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "MutexWrapper.h"
3
4bool 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
13MutexWrapper::~MutexWrapper()
14{

Callers 1

hasAnotherInstanceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected