| 232 | // ---------------------------------------------------------------------------------------- |
| 233 | |
| 234 | bool threaded_object:: |
| 235 | should_stop ( |
| 236 | ) const |
| 237 | { |
| 238 | auto_mutex M(m_); |
| 239 | DLIB_ASSERT(is_alive_ && id1 == get_thread_id() && id_valid == true, |
| 240 | "\tbool threaded_object::should_stop()" |
| 241 | << "\n\tYou can only call this function from the thread that executes threaded_object::thread" |
| 242 | << "\n\tthis: " << this |
| 243 | ); |
| 244 | while (is_running_ == false && should_stop_ == false) |
| 245 | s.wait(); |
| 246 | return should_stop_; |
| 247 | } |
| 248 | |
| 249 | // ---------------------------------------------------------------------------------------- |
| 250 |
nothing calls this directly
no test coverage detected