| 152 | } |
| 153 | |
| 154 | bool 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 | |
| 167 | void thread_base::unlock() { |
| 168 | try { |
no test coverage detected