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

Function threadproc3

dlib/test/pipe.cpp:129–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 typename pipe
128 >
129 void threadproc3 (
130 void* param
131 )
132 {
133 add_running_thread();
134 pipe& p = *static_cast<pipe*>(param);
135 try
136 {
137
138 int last = -1;
139 int cur;
140 while (p.dequeue_or_timeout(cur,100000))
141 {
142 DLIB_TEST(last < cur);
143 last = cur;
144 }
145 auto_mutex M(m);
146 }
147 catch(exception& e)
148 {
149 auto_mutex M(m);
150 found_error = true;
151 cout << "\n\nERRORS FOUND" << endl;
152 cout << e.what() << endl;
153 dlog << LWARN << "ERRORS FOUND";
154 dlog << LWARN << e.what();
155 p.disable();
156 }
157 remove_running_thread();
158 }
159
160
161 }

Callers

nothing calls this directly

Calls 4

add_running_threadFunction · 0.85
remove_running_threadFunction · 0.85
whatMethod · 0.45
disableMethod · 0.45

Tested by

no test coverage detected