MCPcopy Create free account
hub / github.com/davisking/dlib / stop

Method stop

dlib/threads/threaded_object_extension.cpp:214–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212// ----------------------------------------------------------------------------------------
213
214 void threaded_object::
215 stop (
216 )
217 {
218 auto_mutex M(m_);
219
220 DLIB_ASSERT(id1 != get_thread_id() || id_valid == false,
221 "\tvoid threaded_object::stop()"
222 << "\n\tYou can NOT call this function from the thread that executes threaded_object::thread"
223 << "\n\tthis: " << this
224 );
225
226 should_stop_ = true;
227 is_running_ = false;
228 should_respawn_ = false;
229 s.broadcast();
230 }
231
232// ----------------------------------------------------------------------------------------
233

Callers

nothing calls this directly

Calls 2

get_thread_idFunction · 0.70
broadcastMethod · 0.45

Tested by

no test coverage detected