snark
|
#include <bursty_reader.h>
Public Member Functions | |
bursty_reader (boost::function0< T > read, unsigned int size=0) | |
bursty_reader (boost::function0< T > read, unsigned int size, unsigned int capacity) | |
void | join () |
join the push thread | |
void | stop () |
bool | wait () |
~bursty_reader () | |
desctructor |
helper class to run a tbb pipeline with bursty data the pipeline has to be closed when no data is received to prevent the main thread to spin
bursty_reader | ( | boost::function0< T > | read, |
unsigned int | size = 0 |
||
) |
constructor
read | the user-provided read functor that outputs the data |
size | maximum input queue size before discarding data, 0 means infinite |
bursty_reader | ( | boost::function0< T > | read, |
unsigned int | size, | ||
unsigned int | capacity | ||
) |
constructor
read | the user-provided read functor that outputs the data |
size | maximum input queue size before discarding data, 0 means infinite |
capacity | maximum input queue size before the reader thread blocks |
void stop | ( | ) |
stop pushing items in the queue, will not wait until the thread actually exits, call join() if this is what you want
Referenced by pipeline::write_().
bool wait | ( | ) |
wait until the queue is ready
Referenced by bursty_pipeline< T >::run().