MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / Unlock

Method Unlock

IntelPresentMon/CommonUtilities/pipe/CoroMutex.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 return false;
26 }
27 void CoroMutex::Unlock()
28 {
29 // guard against unlocking twice from same coro or unlocked when there are no waiters
30 if (counter_ == 0 || holdoff_) {
31 return;
32 }
33
34 --counter_;
35
36 if (waiters_.empty()) {
37 return;
38 }
39
40 holdoff_ = true;
41 waiters_.front()->cancel();
42 waiters_.pop_front();
43 }
44
45
46 CoroLockGuard::CoroLockGuard(CoroLockGuard&& other)

Callers 1

~CoroLockGuardMethod · 0.80

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected