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

Method wait

dlib/threads/threaded_object_extension.cpp:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82// ----------------------------------------------------------------------------------------
83
84 void threaded_object::
85 wait (
86 ) const
87 {
88 auto_mutex M(m_);
89
90 DLIB_ASSERT(id1 != get_thread_id() || id_valid == false,
91 "\tvoid threaded_object::wait()"
92 << "\n\tYou can NOT call this function from the thread that executes threaded_object::thread"
93 << "\n\tthis: " << this
94 );
95
96 while (is_alive_)
97 s.wait();
98 }
99
100// ----------------------------------------------------------------------------------------
101

Callers

nothing calls this directly

Calls 2

get_thread_idFunction · 0.70
waitMethod · 0.45

Tested by

no test coverage detected