MCPcopy Create free account
hub / github.com/a2flo/floor / try_lock

Method try_lock

threading/thread_base.cpp:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool thread_base::try_lock() {
155 try {
156 const bool ret = thread_lock.try_lock();
157 if(ret) thread_lock_count++;
158 return ret;
159 } catch(system_error& sys_err) {
160 cout << "unable to try-lock thread: " << sys_err.code() << ": " << sys_err.what() << endl;
161 } catch(...) {
162 cout << "unable to try-lock thread" << endl;
163 }
164 return false;
165}
166
167void thread_base::unlock() {
168 try {

Callers 5

runMethod · 0.80
logger.cppFile · 0.80
try_acquire_contextMethod · 0.80
_thread_runMethod · 0.80
TRY_ACQUIREFunction · 0.80

Calls 1

whatMethod · 0.80

Tested by

no test coverage detected