Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bloomberg/quantum
/ tryLock
Method
tryLock
quantum/impl/quantum_mutex_impl.h:64–74 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
62
}
63
64
inline
65
bool Mutex::tryLock()
66
{
67
assert(_taskId != local::taskId());
68
bool rc = _spinlock.tryLock();
69
if (rc) {
70
//mutex is locked
71
_taskId = local::taskId();
72
}
73
return rc;
74
}
75
76
inline
77
void Mutex::unlock()
Callers
1
Guard
Method · 0.45
Calls
1
taskId
Function · 0.85
Tested by
no test coverage detected