Forwards messages only if the threshold has not been reached. More...
#include <flow_graph.h>
Public Types | |
typedef T | input_type |
The input type of this receiver. | |
typedef T | output_type |
The output type of this sender. | |
typedef sender< input_type > | predecessor_type |
The predecessor type for this node. | |
typedef receiver< output_type > | successor_type |
The successor type for this node. | |
Public Member Functions | |
limiter_node (graph &g, size_t threshold, int num_decrement_predecessors=0) | |
Constructor. | |
limiter_node (const limiter_node &src) | |
Copy constructor. | |
bool | register_successor (receiver< output_type > &r) |
Replace the current successor with this new successor. | |
bool | remove_successor (receiver< output_type > &r) |
Removes a successor from this node. | |
bool | register_predecessor (predecessor_type &src) |
Removes src from the list of cached predecessors. | |
bool | remove_predecessor (predecessor_type &src) |
Removes src from the list of cached predecessors. | |
Public Attributes | |
internal::decrementer < limiter_node< T > > | decrement |
The internal receiver< continue_msg > that decrements the count. | |
Protected Member Functions | |
task * | try_put_task (const T &t) |
Puts an item to this receiver. | |
void | reset () |
void | reset_receiver () |
Friends | |
class | internal::forward_task_bypass< limiter_node< T > > |
class | internal::decrementer< limiter_node< T > > |
class | run_and_put_task |
put item to successor; return task to run the successor if possible. | |
class | internal::broadcast_cache |
class | internal::round_robin_cache |
Forwards messages only if the threshold has not been reached.
This node forwards items until its threshold is reached. It contains no buffering. If the downstream node rejects, the message is dropped.
bool tbb::flow::interface6::limiter_node< T >::remove_successor | ( | receiver< output_type > & | r | ) | [inline] |
Removes a successor from this node.
r.remove_predecessor(*this) is also called.
References tbb::flow::interface6::receiver< T >::remove_predecessor().