MCPcopy 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
64inline
65bool 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
76inline
77void Mutex::unlock()

Callers 1

GuardMethod · 0.45

Calls 1

taskIdFunction · 0.85

Tested by

no test coverage detected