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

Method pipe_example

examples/pipe_ex.cpp:81–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79{
80public:
81 pipe_example(
82 ) :
83 job_pipe(4) // This 4 here is the size of our job_pipe. The significance is that
84 // if you try to enqueue more than 4 jobs onto the pipe then enqueue() will
85 // block until there is room.
86 {
87 // register 3 threads
88 register_thread(*this,&pipe_example::thread);
89 register_thread(*this,&pipe_example::thread);
90 register_thread(*this,&pipe_example::thread);
91
92 // start the 3 threads we registered above
93 start();
94 }
95
96 ~pipe_example (
97 )

Callers

nothing calls this directly

Calls 1

startFunction · 0.85

Tested by

no test coverage detected