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

Method thread

dlib/test/pipe.cpp:193–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 out_type OutMsg;
192
193 void thread()
194 {
195 while (!should_stop()) {
196 if(InPipe.dequeue_or_timeout(InMsg, 100))
197 {
198 // if function signals ready to send OutMsg
199 while (!OutPipe.enqueue_or_timeout(OutMsg, 100))
200 {
201 // try to send until should stop
202 if (should_stop())
203 {
204 return;
205 }
206 }
207 }
208 }
209 };
210 };
211
212

Callers

nothing calls this directly

Calls 1

enqueue_or_timeoutMethod · 0.45

Tested by

no test coverage detected