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

Function threadproc1

dlib/test/pipe.cpp:56–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 typename pipe
55 >
56 void threadproc1 (
57 void* param
58 )
59 {
60 add_running_thread();
61 pipe& p = *static_cast<pipe*>(param);
62 try
63 {
64
65 int last = -1;
66 for (unsigned long i = 0; i < proc1_count; ++i)
67 {
68 int cur=0;
69 DLIB_TEST(p.dequeue(cur) == true);
70 DLIB_TEST(last + 1 == cur);
71 last = cur;
72 }
73 DLIB_TEST(p.size() == 0);
74 }
75 catch(exception& e)
76 {
77 auto_mutex M(m);
78 found_error = true;
79 cout << "\n\nERRORS FOUND" << endl;
80 cout << e.what() << endl;
81 dlog << LWARN << "ERRORS FOUND";
82 dlog << LWARN << e.what();
83 p.disable();
84 }
85
86 remove_running_thread();
87 }
88
89
90 template <

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected