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

Class test5

dlib/test/multithreaded_object.cpp:221–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221 class test5 : private multithreaded_object
222 {
223 public:
224 test5()
225 {
226 register_thread(*this,&test5::thread1);
227 register_thread(*this,&test5::thread2);
228 register_thread(*this,&test5::thread3);
229 register_thread(*this,&test5::thread3);
230 start();
231 }
232
233 ~test5()
234 {
235 stop();
236 wait();
237 }
238
239 private:
240
241 void thread1()
242 {
243 while (!should_stop())
244 dlib::sleep(10);
245 }
246
247 void thread2()
248 {
249 while (!should_stop())
250 dlib::sleep(10);
251 }
252
253 void thread3()
254 {
255 while (!should_stop())
256 dlib::sleep(10);
257 }
258
259 };
260
261
262 void multithreaded_object_test (

Callers 1

test_regressionFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_regressionFunction · 0.68