| 155 | // ---------------------------------------------------------------------------------------- |
| 156 | |
| 157 | bool multithreaded_object:: |
| 158 | should_stop ( |
| 159 | ) const |
| 160 | { |
| 161 | auto_mutex M(m_); |
| 162 | DLIB_ASSERT(thread_ids.is_in_domain(get_thread_id()), |
| 163 | "\tbool multithreaded_object::should_stop()" |
| 164 | << "\n\tYou can only call this function from one of the registered threads in this object" |
| 165 | << "\n\tthis: " << this |
| 166 | ); |
| 167 | while (is_running_ == false && should_stop_ == false) |
| 168 | s.wait(); |
| 169 | return should_stop_; |
| 170 | } |
| 171 | |
| 172 | // ---------------------------------------------------------------------------------------- |
| 173 |
nothing calls this directly
no test coverage detected