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

Function threadproc2

dlib/test/pipe.cpp:93–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 typename pipe
92 >
93 void threadproc2 (
94 void* param
95 )
96 {
97 add_running_thread();
98 pipe& p = *static_cast<pipe*>(param);
99 try
100 {
101
102 int last = -1;
103 int cur;
104 while (p.dequeue(cur))
105 {
106 DLIB_TEST(last < cur);
107 last = cur;
108 }
109 auto_mutex M(m);
110 }
111 catch(exception& e)
112 {
113 auto_mutex M(m);
114 found_error = true;
115 cout << "\n\nERRORS FOUND" << endl;
116 cout << e.what() << endl;
117 dlog << LWARN << "ERRORS FOUND";
118 dlog << LWARN << e.what();
119 p.disable();
120 }
121 remove_running_thread();
122 }
123
124
125

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